CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Programming & Development (
-   -   Recycled inflow using directMappedFixedValue (

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:

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

/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!


All times are GMT -4. The time now is 07:19.