资源简介
此为旧版的palabos源代码包,主页上已经没有了,放在这里留存,给同样学习并使用palabos做相应lbm课题的小朋友们,学习用,非盈利,如有侵权,会立刻删掉。CSDN的积分比较怪,我分明放的0积分,过两天就变成积分很高才能下载,如果积分上去了,先不要下载,通知我一下,我改改,看看能不能再改成0
代码片段和文件信息
/* This file is part of the Palabos library.
*
* Copyright (C) 2011-2017 FlowKit Sarl
* Route d‘Oron 2
* 1010 Lausanne Switzerland
* E-mail contact: contact@flowkit.com
*
* The most recent release of Palabos can be downloaded at
*
*
* The library Palabos is free software: you can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation either version 3 of the
* License or (at your option) any later version.
*
* The library is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not see .
*/
/** \file
* Flow in a lid-driven 3D cavity. Benchmark case
**/
#include “palabos3D.h“
#include “palabos3D.hh“ // include full template code
#include
using namespace plb;
using namespace std;
typedef double T;
#define DEscriptOR descriptors::D3Q19Descriptor
void cavitySetup( MultiBlockLattice3DriptOR>& lattice
IncomprFlowParam const& parameters
OnLatticeBoundaryCondition3DriptOR>& boundaryCondition )
{
const plint nx = parameters.getNx();
const plint ny = parameters.getNy();
const plint nz = parameters.getNz();
Box3D topLid = Box3D(0 nx-1 ny-1 ny-1 0 nz-1);
Box3D everythingButTopLid = Box3D(0 nx-1 0 ny-2 0 nz-1);
// All walls implement a Dirichlet velocity condition.
boundaryCondition.setVelocityConditionOnBlockBoundaries(lattice);
T u = std::sqrt((T)2)/(T)2 * parameters.getLatticeU();
initializeAtEquilibrium(lattice everythingButTopLid (T) 1. Array((T)0.(T)0.(T)0.) );
initializeAtEquilibrium(lattice topLid (T) 1. Array(u(T)0.u) );
setBoundaryVelocity(lattice topLid Array(u0.u) );
lattice.initialize();
}
int main(int argc char* argv[]) {
plbInit(&argc &argv);
//defaultMultiBlockPolicy3D().toggleBlockingCommunication(true);
plint N;
try {
global::argv(1).read(N);
}
catch(...)
{
pcout << “Wrong parameters. The syntax is “ << std::endl;
pcout << argv[0] << “ N“ << std::endl;
pcout << “where N is the resolution. The benchmark cases published “ << std::endl;
pcout << “on the Palabos Wiki use N=100 N=400 N=1000 or N=4000.“ << std::endl;
exit(1);
}
pcout << “Starting benchmark with “ << N+1 << “x“ << N+1 << “x“ << N+1 << “ grid points “
<< “(approx. 2 minutes on modern processors).“ << std::endl;
IncomprFlowParam parameters(
(T) 1e-2 // uMax
(T) 1. // Re
N // N
1. // lx
1.
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-09-15 12:01 palabos-v2.0r0\
文件 107 2017-09-15 12:01 palabos-v2.0r0\.gitignore
文件 3605 2017-09-15 12:01 palabos-v2.0r0\.gitlab-ci.yml
文件 34520 2017-09-15 12:01 palabos-v2.0r0\COPYING
文件 339 2017-09-15 12:01 palabos-v2.0r0\README.md
文件 3118 2017-09-15 12:01 palabos-v2.0r0\SConstruct
目录 0 2017-09-15 12:01 palabos-v2.0r0\codeblocks\
文件 9799 2017-09-15 12:01 palabos-v2.0r0\codeblocks\Palabos.cbp
文件 397 2017-09-15 12:01 palabos-v2.0r0\codeblocks\Palabos.layout
目录 0 2017-09-15 12:01 palabos-v2.0r0\codeblocks\tmp\
文件 71 2017-09-15 12:01 palabos-v2.0r0\codeblocks\tmp\.gitignore
目录 0 2017-09-15 12:01 palabos-v2.0r0\examples\
目录 0 2017-09-15 12:01 palabos-v2.0r0\examples\benchmarks\
目录 0 2017-09-15 12:01 palabos-v2.0r0\examples\benchmarks\cavity3d\
文件 3502 2017-09-15 12:01 palabos-v2.0r0\examples\benchmarks\cavity3d\Makefile
文件 4579 2017-09-15 12:01 palabos-v2.0r0\examples\benchmarks\cavity3d\cavity3d.cpp
目录 0 2017-09-15 12:01 palabos-v2.0r0\examples\codesByTopic\
目录 0 2017-09-15 12:01 palabos-v2.0r0\examples\codesByTopic\asinariDynamics\
文件 3508 2017-09-15 12:01 palabos-v2.0r0\examples\codesByTopic\asinariDynamics\Makefile
文件 26305 2017-09-15 12:01 palabos-v2.0r0\examples\codesByTopic\asinariDynamics\aneurysm.cpp
文件 625121 2017-09-15 12:01 palabos-v2.0r0\examples\codesByTopic\asinariDynamics\aneurysm.stl.tgz
文件 7643 2017-09-15 12:01 palabos-v2.0r0\examples\codesByTopic\asinariDynamics\cavity3d.cpp
文件 2477 2017-09-15 12:01 palabos-v2.0r0\examples\codesByTopic\asinariDynamics\param_aneurysm.xm
文件 11269 2017-09-15 12:01 palabos-v2.0r0\examples\codesByTopic\asinariDynamics\poiseuille.cpp
目录 0 2017-09-15 12:01 palabos-v2.0r0\examples\codesByTopic\asinariDynamics\tmp\
文件 71 2017-09-15 12:01 palabos-v2.0r0\examples\codesByTopic\asinariDynamics\tmp\.gitignore
目录 0 2017-09-15 12:01 palabos-v2.0r0\examples\codesByTopic\bounceBack\
文件 3504 2017-09-15 12:01 palabos-v2.0r0\examples\codesByTopic\bounceBack\Makefile
文件 6135 2017-09-15 12:01 palabos-v2.0r0\examples\codesByTopic\bounceBack\computeDrag.cpp
文件 3354 2017-09-15 12:01 palabos-v2.0r0\examples\codesByTopic\bounceBack\instantiateCylinder.cpp
目录 0 2017-09-15 12:01 palabos-v2.0r0\examples\codesByTopic\bounceBack\tmp\
............此处省略2293个文件信息
- 上一篇:iOS13.417E262真机包.zip
- 下一篇:国家电网考试资料
评论
共有 条评论