|
[Sponsors] |
[swak4Foam] groovy bc, conditioned valueExpression. |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 16, 2015, 04:48 |
groovy bc, conditioned valueExpression.
|
#1 |
Member
Kan
Join Date: Feb 2014
Location: Australia
Posts: 54
Rep Power: 12 |
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; else if ( Re > 4000 ) hf2; else hf1; 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 |
|
March 16, 2015, 09:47 |
|
#2 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22 |
You could try something like
Code:
valueExpression "Re <= 2000 ? hf0 : (Re <= 4000 ? hf1 : hf2)"; |
|
March 16, 2015, 18:30 |
|
#3 |
Member
Kan
Join Date: Feb 2014
Location: Australia
Posts: 54
Rep Power: 12 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] Engine-pressure BC and velocity field (groovy) | Tobi | OpenFOAM Community Contributions | 3 | October 15, 2018 15:09 |
[swak4Foam] groovy BC | imani | OpenFOAM Community Contributions | 1 | April 13, 2014 08:43 |
[swak4Foam] groovy BC | Ahmed Khattab | OpenFOAM Community Contributions | 4 | November 7, 2013 08:51 |
[swak4Foam] groovyBC: using gradientExpression instead of valueExpression | gregdB | OpenFOAM Community Contributions | 15 | September 20, 2013 09:03 |
[swak4Foam] Setting BC for a passive scalar (groovy vs fvOptions) | Tobi | OpenFOAM Community Contributions | 0 | May 23, 2013 15:53 |