CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Programming & Development

Convective boundary condition using average velocity

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

Like Tree1Likes
  • 1 Post By bala_gk1988

LinkBack Thread Tools Display Modes
Old   December 2, 2013, 09:26
Default Convective boundary condition using average velocity
New Member
Join Date: Dec 2013
Posts: 5
Rep Power: 3
bala_gk1988 is on a distinguished road
Hi guys,
I am trying to create a convective boundary condition for my LES jet flow problem. Although other user written boundary condition are available in this forum, I am trying to implement a BC which uses the average velocity of the patch as the convective velocity.

I decided to modify the advective boundary condition, which uses the local flux to calculate the convective velocity. I just modified the portion which calculates the advection speed(convective velocity). The below code is compiling without errors. Is it correct.

Foam::convectiveFvPatchField<Type>::advectionSpeed () const
const surfaceScalarField& phi =
this->db().objectRegistry::template lookupObject<surfaceScalarField>

fvsPatchField<scalar> phip =
this->patch().template lookupPatchField<surfaceScalarField, scalar>
fvsPatchField<scalar> phipt(phip);
phipt = Foam::gSum(phip); //****** Line one ******//

const scalarField& areap = this->patch().magSf();
scalarField area(areap.size(),Foam::gSum(areap)); //*** Line two ***/

return phipt/area;

In line one can I equate a surface scalar patch field to a surface scalar ?
Is line two correct ?
mgg likes this.
bala_gk1988 is offline   Reply With Quote


cbc, convective

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
Radiation interface hinca CFX 15 January 26, 2014 18:11
CFX fails to calculate a diffuser pipe flow shenying0710 CFX 7 March 26, 2013 05:13
Velocity inlet boundary condition for porous medium Chander CFX 3 March 11, 2012 22:18
velocity boundary condition Logan Page OpenFOAM 0 November 19, 2010 18:59
New topic on same subject - Flow around race car Tudor Miron CFX 15 April 2, 2004 06:18

All times are GMT -4. The time now is 15:58.