|
[Sponsors] |
Help with codedMixed boundary condition. Overloading the = operator |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 6, 2021, 15:44 |
Help with codedMixed boundary condition. Overloading the = operator
|
#1 |
Member
Join Date: Feb 2020
Posts: 90
Rep Power: 6 |
Hello to all,
I am writing a codedMixed boundary condition to emulate the behavior of a boundary implemented into OpenFOAM. As an example let us consider the following: Code:
rightWall { type codedMixed; refValue uniform (0 0 0); refGradient uniform (0 0 0); valueFraction uniform 1; name velocityMixed; code #{ refValue() = some expression refGrad() = some expression valueFraction() = some expression #}; } Code:
void Foam::boundaryFvPatchVectorField ::operator= ( const fvPatchField<vector>& pvf ) { tmp<vectorField> n = patch().nf(); fvPatchField<vector>::operator= ( valueFraction()*(n()*(n() & pvf)) + (1 - valueFraction())*pvf ); } Something like: [?] Code:
( valueFraction()*refValue() + (1.0 - valueFraction())* ( this->patchInternalField() + refGrad()/this->patch().deltaCoeffs() ) ); Best Regards Last edited by Shibi; July 8, 2021 at 05:42. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
sliding mesh problem in CFX | Saima | CFX | 46 | September 11, 2021 08:38 |
Wrong flow in ratating domain problem | Sanyo | CFX | 17 | August 15, 2015 07:20 |
Accessing multiple boundary patches from a custom boundary condition file | ripudaman | OpenFOAM Programming & Development | 0 | October 22, 2014 19:34 |
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 |