groovy bc, conditioned valueExpression.
Dear OpenFOAMer,
I am currently using groovyBC to set my thermal boundary condition, the flow regime is determined based on Reynolds number Re, which is calculated in the "variables", and three different heat transfer coefficients ( hf0, hf1, hf2 ) corresponding to laminar, transition and turbulent are also calculated with "variables". The condition is something like Code:
if ( Re< 2000 ) hf0; Here is the example I found: Code:
valueExpression "(pos().z<=A*cos(-w*time())+0.5*k*A*A*cos(2*(-w*time()))) ? 1 : 0"; Cheers, Kan |
You could try something like
Code:
valueExpression "Re <= 2000 ? hf0 : (Re <= 4000 ? hf1 : hf2)"; |
Quote:
Cheers, Kan |
All times are GMT -4. The time now is 06:00. |