Questions about modifications of mixed boundary conditions
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>:operator= ( valueFraction_*refValue_ + (1.0 - valueFraction_)* ( this->patchInternalField() + refGrad_/this->patch().deltaCoeffs() ) ); fvPatchField<Type>::evaluate(); } What exact modifications should I do? Regards, Fumiya |
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 |
All times are GMT -4. The time now is 21:56. |