Is it possible to read in a vo
Is it possible to read in a volScalarfield from a
data file (in the constant directory) during the run and if yes, how can this be achieved? Thanks in advance. |
Yes, instead of say
vol
Yes, instead of say
volScalarField p ( IOobject ( "p", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ); use volScalarField p ( IOobject ( "p", "constant", mesh, IOobject::MUST_READ, IOobject::NO_WRITE ), mesh ); |
Thank you very much for your h
Thank you very much for your help. Originally I replaced runTime.timeName() by runTime.constant(). The results are identical.
I set up the file defining the field beginning with: dimensions [...]; internalField nonuniform ( .. here the values are inserted ) What I know is that I have to insert the values for the interior cells. But, in what order? And how do they relate to the cells and their indices, respectively. I would like to specify the values in the same ordering as for the cells (polyMesh/cells). Is it possible? Is there a chance to define the values for the entire mesh, not only for the internal and boundary fields, e.g. by using a different keyword, e.g. Field ...? |
Come on, this is trivial: the
Come on, this is trivial: the list of values is in the same order as the list of cells: first value into first cell, second value into a second cell etc. Anything else would be madness.
Hrv P.S. For future reference, think about your problems: if it is logical, it is probably right! |
BTW, before you ask, the same
BTW, before you ask, the same applies for points, edges, faces, faces in patch etc.
Hrv |
Hello,
I've asked about how to create and use a new volScalarField on a drag model. But now, I solved. I did it creating the variable on createFields.H, and later, calling it on the drag model file using lookup, command. |
All times are GMT -4. The time now is 17:04. |