Calculations and Dimensions
Hi,
I am working with the multiphaseEulerFoam and I recognized that sometimes fields are initialized like Code:
volScalarField p Code:
volVectorField U |
Hi Maybee,
The clue is in the way the field is read: In case of your 'p'-example, the p-field must be read (IOobject::MUST_READ). Initial value of the field and also the dimensions are read from the field in the time folder "runTime.timeName()". In case of the velocity field U. You specify IOobject::NO_READ meaning that OF will not search for an input file in the time folder but that the field is initialized by the dimensions vector (which automatically defines the dimensions). There is an other option possible: READ_IF_PRESENT which basically combines the two previous ones. (in fact also a fourth, MUST_READ_IF_MODIFIED, but this is less relevant in the present context). Hope this clarifies things... Cheers, L |
Thx. got it now. :)
|
Hi Lieven, I want to define volSymmetryField, but I don't know know how to write the code of demensioneSet and initialize it. Would you mind giving me some advice? Thanks!
|
All times are GMT -4. The time now is 10:41. |