CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM

calculated type of primitive boundary field

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

LinkBack Thread Tools Display Modes
Old   February 19, 2010, 01:35
Default calculated type of primitive boundary field
New Member
Join Date: Jan 2010
Posts: 8
Rep Power: 9
suniljain is on a distinguished road
hi .
what is the syntax of calculated type of primitive boundary case has three coupled equation with 3 variables. i have a relation between two variables (fields) at a particular patch , say x=constant *y. so how to give boundary condition for x and y at that patch. please help me.

Last edited by suniljain; March 10, 2010 at 04:37.
suniljain is offline   Reply With Quote

Old   February 19, 2010, 17:19
Senior Member
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 12
benk is on a distinguished road
If I understand your question, you have 2 equations coupled via a fixedValue boundary condition. Something like this should work for your boundary condition (although I'd be interested to know if there's a better way):

label wall2 = mesh.boundaryMesh().findPatchID("boundaryWall2");
fixedValueFvPatchScalarField& bufferT = refCast<fixedValueFvPatchScalarField>(T.boundaryField()[wall2]);

scalarField& valT  = bufferT;

forAll (valT, faceI)
  valT[faceI] =   c.boundaryField()[wall2][faceI];
This code will set the boundary condition for T equal to c at the boundary labeled "boundaryWall2".

For a gradient boundary condition, it's similar (described here:
benk is offline   Reply With Quote


Thread Tools
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Wind turbine simulation Saturn CFX 45 February 8, 2016 05:42
Problem with cyclic boundaries in Openfoam 1.5 fs82 OpenFOAM 36 January 7, 2015 01:31
Using starToFoam clo OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 33 September 26, 2012 04:04
pipe flow with heat transfer Fabian OpenFOAM 2 December 12, 2009 05:53
transient simulation of a rotating rectangle icesniffer CFX 1 August 8, 2009 07:25

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