|
[Sponsors] |
June 30, 2023, 08:27 |
Cod
|
#1 |
New Member
shouvik ghorui
Join Date: Oct 2019
Posts: 15
Rep Power: 7 |
Hello Foamers, I am trying to develop Boundary Condition Using codedMixed boundary condition, For a time interval outlet will be zeroGradient and next time, it will be FixedValue but the fixedValue needs to take value at an outlet when ZeroGradient ends. Here is the used code..
type codedMixed; refValue uniform 0; refGradient uniform 0; valueFraction uniform 1; name codedPatchBC_lobe_1; code #{ const scalar t = this->db().time().value(); const scalar pi = constant::mathematical:i; const scalar sign_check=sin(2*pi*t/4); if (pos0(sign_check) == 1)//f=0,zeroGradient { scalarField& field = *this; this->refValue() = field; this->valueFraction() = 0; this->refGrad() = 0; } else//f=1,FixedValue { scalarField& field = *this; this->valueFraction() = 1; this->refValue() = field; this->refGrad() = 0; } #}; But I am not getting the result, near the outlet, its getting zero, Is this problem something related to *this ? any help will be much appreciated, Thanks For your time |
|
Tags |
boudary condition, boundaries condition, preprocessing |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Fundamentals of the KRAKEN Cod | ztdep | Main CFD Forum | 0 | April 5, 2012 00:38 |
front tracking cod | amirbahador | Main CFD Forum | 0 | September 14, 2010 14:50 |
CoL, Lift force, CoD, Drag Force | Echidna | CFX | 3 | June 18, 2010 06:59 |
cod for lagrangian particle tracking | mazdak | Main CFD Forum | 2 | December 29, 2009 03:53 |
rsm in cfd cod? | Ali javadi | Main CFD Forum | 0 | October 3, 2001 09:54 |