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/)
-   -   Accessing other variables in defining boundary condition (http://www.cfd-online.com/Forums/openfoam-solving/62983-accessing-other-variables-defining-boundary-condition.html)

Cynthia Poon March 25, 2009 04:36

Accessing other variables in defining boundary condition
 
Dear All,

I am going to write a boundary conditon by the fvPatchFields like this:
grad(Ux) = function of k
where Ux = x-component of Velocity; k = turbulent kinetic energy;

In my fvPatchFields class, I obtain k by writing this:
const fvPatchField<scalar>& k =
patch().lookupPatchField<volScalarField,scalar>("k ");


The boundary condition compile successfully, but when I start running my case, an error message like this appear:
request for volScalarField k from objectRegistry region0 failed
available objects of type volScalarField are
3
(
p
T
CdA
)

All p, T and CdA are defined in createField.C of my solver, while the k is first defined inside another class. Is it because k is the private data of RAS/kEpsilon Model, so I cannot get an access to this private data? Or my code quoted above is wrong?

Would anybody please kindly give me an idea on how can I access that volScalarField variable? I long for the help!

Regards,
Cynthia


All times are GMT -4. The time now is 03:54.