本文整理汇总了C++中IncomprFlowParam::getNz方法的典型用法代码示例。如果您正苦于以下问题:C++ IncomprFlowParam::getNz方法的具体用法?C++ IncomprFlowParam::getNz怎么用?C++ IncomprFlowParam::getNz使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IncomprFlowParam
的用法示例。
在下文中一共展示了IncomprFlowParam::getNz方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: cavitySetup
void cavitySetup( MultiBlockLattice3D<T,DESCRIPTOR>& lattice,
IncomprFlowParam<T> const& parameters,
OnLatticeBoundaryCondition3D<T,DESCRIPTOR>& 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 bottomLid = Box3D(0, nx-1, 0, 0, 0, nz-1);
Box3D everythingButTopLid = Box3D(0, nx-1, 0, ny-2, 0, nz-1);
/*
instantiateOuterNLDboundary(lattice, lattice.getBoundingBox());
setOuterNLDboundaryDynamics(lattice, lattice.getBackgroundDynamics().clone(),
lattice.getBoundingBox(), boundary::dirichlet);
setOuterNLDboundaryDynamics(lattice, lattice.getBackgroundDynamics().clone(), bottomLid, boundary::neumann);
defineDynamics(lattice, bottomLid, lattice.getBackgroundDynamics().clone());
*/
boundaryCondition.setVelocityConditionOnBlockBoundaries(lattice, lattice.getBoundingBox(), boundary::dirichlet);
T u = sqrt((T)2)/(T)2 * parameters.getLatticeU();
initializeAtEquilibrium(lattice, everythingButTopLid, (T) 1., Array<T,3>(0.,0.,0.) );
initializeAtEquilibrium(lattice, topLid, (T) 1., Array<T,3>(u,0.,u) );
setBoundaryVelocity(lattice, topLid, Array<T,3>(u,0.,u) );
lattice.initialize();
}
示例2: writeGifs
void writeGifs(BlockLatticeT& lattice,
IncomprFlowParam<T> const& parameters, plint iter)
{
const plint imSize = 600;
const plint nx = parameters.getNx();
const plint ny = parameters.getNy();
const plint nz = parameters.getNz();
const plint zComponent = 2;
Box3D slice(0, nx-1, 0, ny-1, nz/2, nz/2);
ImageWriter<T> imageWriter("leeloo");
imageWriter.writeScaledGif( createFileName("uz", iter, 6),
*computeVelocityComponent (lattice, slice, zComponent),
imSize, imSize );
imageWriter.writeScaledGif( createFileName("uNorm", iter, 6),
*computeVelocityNorm (lattice, slice),
imSize, imSize );
}
示例3: cavitySetup
void cavitySetup( MultiBlockLattice3D<T,DESCRIPTOR>& lattice,
IncomprFlowParam<T> const& parameters,
OnLatticeBoundaryCondition3D<T,DESCRIPTOR>& 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);
boundaryCondition.setVelocityConditionOnBlockBoundaries(lattice);
T u = std::sqrt((T)2)/(T)2 * parameters.getLatticeU();
initializeAtEquilibrium(lattice, everythingButTopLid, (T)1., Array<T,3>((T)0.,(T)0.,(T)0.) );
initializeAtEquilibrium(lattice, topLid, (T)1., Array<T,3>(u,(T)0.,u) );
setBoundaryVelocity(lattice, topLid, Array<T,3>(u,(T)0.,u) );
lattice.initialize();
}