CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   fixedGradient Boundary Condition (http://www.cfd-online.com/Forums/openfoam-programming-development/92869-fixedgradient-boundary-condition.html)

Hisham September 27, 2011 16:52

fixedGradient Boundary Condition
 
Dear Foamers,

I am currently developing a boundary condition to interpolate values over time and space like the timeVaryingMappedFixedValue patch, but for traction/pressure (tractionDisplacement patch) which inherits the fixedGradient patch.

After the interpolation weight (s) is calculated, the timeVaryingMappedFixedValue patch assigns values through this command

Code:

00710 this->operator==((1-s)*startSampledValues_ + s*endSampledValues_);
From this post, I understood that the "==" operator imposes assigned values on the patch (if a "=" is used then new values will not be imposed).

On the other hand, the tractionDisplacement BC assigns its values to gadient() as:
Code:

gradient() =
    (
        (traction_ + pressure_*n)/rho.value()
      + twoMuLambda*fvPatchField<vector>::snGrad() - (n & sigmaD)
    )/twoMuLambda;

My question is: Is it OK to just assign calculated values "gradient" to the gradient() using a "=" operator for each time step? Or is some forcing of the values needed?

Best regards,
Hisham


All times are GMT -4. The time now is 10:31.