CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Probe or something else to monitor (http://www.cfd-online.com/Forums/openfoam-solving/59862-probe-something-else-monitor.html)

hoerl January 14, 2007 21:39

hi a task i want to do is
 
hi

a task i want to do is monitor a few specified point locations (x,y,z) in a further step lines or planes. monitor means i want to write each time step a set of the vectors in a file. something which is similar done within the oodles solver.

to my question:

as there are some already existing solver stuff like reading the scalarfield of pressure in the createFields.H it comes to my mind to "auto_write" my selection with something similar.

original inread and auto_write of a scalarfield:
volScalarField p
(
IOobject
(
"p",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);

so is there an possibility which makes sense that i could do something like this, right after the code above ?

volScalarField * pmonit
pmonit = &p
pmonit(
IOobject
(
"pmonit",
runTime.timeName(),
PartOfMesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
PartOfMesh
);

or is this complete rubbish ?! and if it is rubbish could someone explain me the sens of the (original code) two mesh entries ?! (the second appearance was explained in another post, if it is really for initialize the values)

hopefully the flame concerning me is not to hard :-)

PS: i didn't tried it so far myself cause if it is trivial wrong - it was time keeping and yes it is 2:42 in the morning *snorrrrrrrrr

mattijs January 15, 2007 05:13

>two mesh entries: - the IO
 
>two mesh entries:

- the IOobject contains the database that the object should be registered onto. This database is actually the mesh.

- the second mesh is needed for the construction of the volScalarField. This is needed to get all the dimensions of the mesh (numbers of cells, patches etc.)

hoerl January 15, 2007 07:04

so is it possible to register
 
so is it possible to register the IOobject to mesh."selection" and as the second the whole mesh?

the output would be something like an initialized field with eg. constant 0 around the whole mesh and in the selected a few entries ?!


seems to be that the probe like in the oodles solver will be the better solution for what i wanna do. nevertheless i hope someone could answer the questions above.


All times are GMT -4. The time now is 12:21.