CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Question about Accessing a field in time directory (https://www.cfd-online.com/Forums/openfoam-pre-processing/181060-question-about-accessing-field-time-directory.html)

Jung hoo December 6, 2016 08:15

Question about Accessing a field in time directory
 
Hi, foamers. I'm modifying the source code of InterFoam for my study.

In the process, I have to access the 'nut', which is the field name in the time directory, and extract the values at a boundary.
So, I used this code.

Quote:

const volScalarField& nut = db().lookupObject<volScalarField>("nut");
But When I tried to compile the code, I got the following error message.

Quote:

‘db’ was not declared in this scope
In case of modifying a boundary condition, the code didn't make any problem.

I'm wondering if there is another way to access a Field in time directory.

Thank you in advance.


All times are GMT -4. The time now is 05:18.