// Random number generator Random perturbation(1234567);
const vectorField& centres = mesh.C();
forAll(centres, celli) { // add a small (+/-20%) random component to enhance symetry breaking scalar deviation=1.0 + 0.2*perturbation.GaussNormal<scalar>();
The mapFields function object maps input fields from local mesh to
secondary mesh at runtime. mapFields
可以使得之前的湍流流场(速度场和压力场)插值到新算例中,从来进行计算,这样计算大大增加了计算速度,可以很快地出现湍流现象。
格式如下:
Usage: mapFields [OPTIONS] <sourceCase>7
Options的选项:
-case <dir> Specify case directory to use(instead of cwd) -consistent Source and target geometry and boundary conditions identical -mapMethod <word> Specify the mapping method -parallelSource The source is decomposed -parallelTarget The target is decomposed -sourceDecomposeParDict <file> Read decomposePar dictionary from specified location -sourceRegion <word> Specify the source region -sourceTime <scalar|'latestTime'> Specify the source time -subtract Subtract mapped source from target -targetDecomposeParDict <file> Read decomposePar dictionary from specified location -targetRegion <word> Specify the target region -doc Display documentation in browser -help Display short help and exit -help-full Display full help and exit Map volume fields from one mesh to another Using: OpenFOAM-v2206 (2206) - visit www.openfoam.com