CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Convective boundary condition using average velocity

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By bala_gk1988

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 2, 2013, 09:26
Default Convective boundary condition using average velocity
  #1
New Member
 
Balajee
Join Date: Dec 2013
Posts: 13
Rep Power: 13
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>
(phiName_);

fvsPatchField<scalar> phip =
this->patch().template lookupPatchField<surfaceScalarField, scalar>
(
phiName_
);
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 and milena like this.
bala_gk1988 is offline   Reply With Quote

Old   January 16, 2019, 10:04
Default
  #2
Senior Member
 
Jianrui Zeng
Join Date: May 2018
Location: China
Posts: 157
Rep Power: 8
calf.Z is on a distinguished road
Do you test your BC successfully?
calf.Z is offline   Reply With Quote

Reply

Tags
cbc, convective


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
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 07:18


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