CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Accessing other variables in defining boundary condition

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By Voulet

LinkBack Thread Tools Search this Thread Display Modes
Old   March 25, 2009, 03:36
Default Accessing other variables in defining boundary condition
New Member
Cynthia Poon
Join Date: Mar 2009
Posts: 4
Rep Power: 15
Cynthia Poon is on a distinguished road
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

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!

Cynthia Poon is offline   Reply With Quote

Old   September 27, 2021, 06:28
Join Date: Jun 2019
Posts: 34
Rep Power: 5
Voulet is on a distinguished road
Hello. I've exacly the same problem 12 years after you.

Does someone has a solution ? Is it possible to access a turbulence-related quantity in this way ? I use OF8.
Malkocoglu likes this.
Debugging is what CFD is about. 5 minutes to modify your code, 5 months to find why it does not work anymore.
Voulet is offline   Reply With Quote


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
inlet velocity boundary condition murali CFX 5 August 3, 2012 08:56
outlet boundary condition Nina Schiepel CFX 2 July 12, 2008 15:27
spanwiperiodic boundary condition for LES Sungho Yoon CFX 5 July 8, 2008 06:21
help in defining boundary condition rama krishna FLUENT 2 July 25, 2005 04:59
Pressure Boundary Condition Matt Umbel Main CFD Forum 0 January 11, 2002 10:06

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