CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Programming & Development (
-   -   fixedGradient Boundary Condition (

Hisham September 27, 2011 15: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


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:

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

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,

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