CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

Questions about modifications of mixed boundary conditions

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

Reply
 
LinkBack Thread Tools Display Modes
Old   September 12, 2012, 05:29
Default Questions about modifications of mixed boundary conditions
  #1
Senior Member
 
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 169
Rep Power: 7
fumiya is on a distinguished road
Hi,

I want to modify the mixed boundary condition in OpenFOAM so that
I can set the refValue up as the boundary value of another field U.

I think I have to make modifications something like the followings to the
original code(src/finiteVolume/fields/fvPatchFields/basic/mixed/
mixedFvPatchField.C).

In the evaluate function,

template<class Type>
void mixedFvPatchField<Type>::evaluate(const Pstream::commsTypes)
{
if (!this->updated())
{
this->updateCoeffs();
}

************my modifications***********************************
const fvPatchField<Type>& Up =
this->patch().template lookupPatchField<volField<Type>, Type>("U");

refValue_ = boundary value of Up;
************************************************** *********

Field<Type>perator=
(
valueFraction_*refValue_
+
(1.0 - valueFraction_)*
(
this->patchInternalField()
+ refGrad_/this->patch().deltaCoeffs()
)
);

fvPatchField<Type>::evaluate();
}

What exact modifications should I do?

Regards,
Fumiya

Last edited by fumiya; September 15, 2012 at 02:08.
fumiya is offline   Reply With Quote

Old   September 14, 2012, 12:50
Default
  #2
Senior Member
 
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 169
Rep Power: 7
fumiya is on a distinguished road
To be more specific, could you tell me how to use the lookupPatchField
for any kind of Field (scalar, vector, tensor), like

const fvPatchField<Type>& Up =
this->patch().template lookupPatchField<volField<Type>, Type>("U");

When I use the above command, there is an error that volField was not
declared in this scope.

Fumiya

Last edited by fumiya; September 15, 2012 at 02:09.
fumiya is offline   Reply With Quote

Reply

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
domain imbalance for enrgy equation happy CFX 14 September 6, 2012 01:54
Domain Imbalance HMR CFX 3 March 6, 2011 21:10
Update boundary conditions calculated by an external program CedricVH OpenFOAM 2 January 15, 2010 12:55
Fluent accuracy and boundary conditions Paolo Lampitella FLUENT 0 June 12, 2008 06:25


All times are GMT -4. The time now is 09:17.