SparseBlockStructure3D blockStructure(createRegularDistribution3D(nx, ny, nz));
#ifdef MRT
Dynamics<T,DESCRIPTOR>* dynamics
= new SmagorinskyDynamics<T,DESCRIPTOR>(new VariableOmegaMRTdynamics<T,DESCRIPTOR>(omega), omega, cSmago);
Dynamics<T,DESCRIPTOR>* dynamics2
= new SmagorinskyDynamics<T,DESCRIPTOR>(new VariableOmegaMRTdynamics<T,DESCRIPTOR>(omega2), omega2, cSmago);
#else
Dynamics<T,DESCRIPTOR>* dynamics
= new SmagorinskyBGKdynamics<T,DESCRIPTOR>(omega, cSmago);
Dynamics<T,DESCRIPTOR>* dynamics2
= new SmagorinskyBGKdynamics<T,DESCRIPTOR>(omega2, cSmago);
#endif
// If surfaceTensionLB is 0, then the surface tension algorithm is deactivated.
// If contactAngle is less than 0, then the contact angle algorithm is deactivated.
TwoPhaseFields3D<T,DESCRIPTOR> fields(blockStructure, dynamics->clone(), dynamics2->clone(), rhoEmpty, densityRatio,
surfaceTensionLB, contactAngle, externalForce, externalForce2, model);
pcout << "Setting initial fluid flags." << std::endl;
// Initialization
analyticalIniVolumeFraction(fields.volumeFraction, fields.flag, insideFluid, 32);
Box3D bottom (0, nx-1, 0, ny-1, 0, 0);
Box3D top (0, nx-1, 0, ny-1, nz-1, nz-1);
setToConstant(fields.flag, bottom, (int) twoPhaseFlag::wall);
setToConstant(fields.flag, top, (int) twoPhaseFlag::wall);
fields.periodicityToggle(0, true);
fields.periodicityToggle(1, true);
fields.periodicityToggle(2, false);
fields.partiallyDefaultInitialize();
what’s the meaning of this operation: analyticalIniVolumeFraction(fields.volumeFraction, fields.flag, insideFluid, 32);
And I want to initialize the velocity field, but I don’t know how to initilaize the velocity field and what operation to use, where can I find this operation, and what can I do to initialize the velocity field.