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

Questions about modifications of mixed boundary conditions

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 12, 2012, 06:29
Default Questions about modifications of mixed boundary conditions
  #1
Senior Member
 
fumiya's Avatar
 
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 266
Blog Entries: 1
Rep Power: 19
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 03:08.
fumiya is offline   Reply With Quote

Old   September 14, 2012, 13:50
Default
  #2
Senior Member
 
fumiya's Avatar
 
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 266
Blog Entries: 1
Rep Power: 19
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 03:09.
fumiya is offline   Reply With Quote

Reply


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
Domain Imbalance HMR CFX 5 October 10, 2016 06:57
domain imbalance for enrgy equation happy CFX 14 September 6, 2012 02:54
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 07:25


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