CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Recycled inflow using directMappedFixedValue (https://www.cfd-online.com/Forums/openfoam-programming-development/80333-recycled-inflow-using-directmappedfixedvalue.html)

Fransje September 22, 2010 15:30

Recycled inflow using directMappedFixedValue
 
Dear Foamers,

I'm trying to implement a recycling inflow somewhat similar to that of Lund, Wu and Squires.

OpenFOAM has two pre-programmed boundary conditions allowing a one-to-one remapping of a velocity field taken from a plane in the domain to the inflow, through directMappedFixedValueFvPatchField and through directMappedVelocityFluxFixedValueFvPatchField. My idea was to take the directMappedFixedValue boundary condition and start from there.

Soon enough I encountered my first problem when trying to access the "nu" value read in during the initialization of pisoFoam.
I'm using the following code:
Code:

const dimensionedScalar& readNu = db().lookupObject<IOdictionary>("transportProperties").lookup("nu");
and get the following error from the compiler:
Quote:

/directMappedFixedValueFvPatchField.C: In member function ‘virtual void Foam::directMappedFixedValueFvPatchField<Type>::up dateCoeffs()’:
/directMappedFixedValueFvPatchField.C:186: error: there are no arguments to ‘db’ that depend on a template parameter, so a declaration of ‘db’ must be available
The point is, when I try to use the same code in the directMappedVelocityFluxFixedPatch BC which is not a template class, but is for the rest very similar to directMappedFixedValue, it does work..

Would somebody have an insight on what I might be doing wrong?

Thank you in advance!

Francois.


All times are GMT -4. The time now is 04:49.