CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums

codedFixedValue Boundary Condition

Register Blogs Members List Search Today's Posts Mark Forums Read

In this blog, quick reference notes about OpenFOAM are posted in a form of a summary to address a specific topic per post, which I think could be helpful as a reminder for my Alzheimer condition
Rate this Entry

codedFixedValue Boundary Condition

Posted April 11, 2012 at 16:57 by Hisham

This is an example of using codedFixedValue boundary condition to input expressions that are time and position dependent.

Code:
    PatchName
    {
      type               codedFixedValue; 
      value              uniform (0 0 0); //$internalField;
      redirectType    BC_Given_Name; 
      code 
	#{ 
	     fixedValueFvPatchVectorField myPatch (*this);
	     forAll(myPatch, celli)
	       {
	         myPatch[celli] = (this->db().time().value()/*TIME*/ * this->patch().Cf()[celli]/*centers of patch faces (for x-value use  this->patch().Cf()[celli][0])*/ );
	       }
	    operator==(myPatch); 
	#}; 
    }
Posted in Uncategorized
Views 1161 Comments 0 Edit Tags Email Blog Entry
« Prev     Main     Next »
Total Comments 0

Comments

 

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