|
[Sponsors] |
Questions about modifications of mixed boundary conditions |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 12, 2012, 06:29 |
Questions about modifications of mixed boundary conditions
|
#1 |
Senior Member
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 266
Blog Entries: 1
Rep Power: 19 |
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. |
|
September 14, 2012, 13:50 |
|
#2 |
Senior Member
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 266
Blog Entries: 1
Rep Power: 19 |
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. |
|
|
|
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 |