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

Cod

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 30, 2023, 08:27
Default Cod
  #1
New Member
 
shouvik ghorui
Join Date: Oct 2019
Posts: 15
Rep Power: 7
shouvik ghorui is on a distinguished road
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
shouvik ghorui is offline   Reply With Quote

Reply

Tags
boudary condition, boundaries condition, preprocessing


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
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


All times are GMT -4. The time now is 04:29.