|
[Sponsors] |
[swak4Foam] is it possible to write a simple program in groovyBC according to C++ language? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 3, 2013, 06:42 |
is it possible to write a simple program in groovyBC according to C++ language?
|
#1 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
the condition?expression1:expression2 makes limitations for me.I need more freedom in conditions.are we limited to groovyBC syntax or exists a way to extend this to if-elseif-else conditions?i need to set several conditions for all fractionExpression,valueExpression and gradientExpression.
|
|
February 4, 2013, 01:44 |
|
#2 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
i need to be certain.any answer?
|
|
February 4, 2013, 05:13 |
|
#3 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Code:
cond1 ? val1 : (cond2 ? val2 : val3)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
February 4, 2013, 05:26 |
|
#4 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
i said a simple example.my bc's are unfortunately much complicated.it should include sub or supersonic and inflow or outflow conditions at each patch.thanks.
|
|
February 4, 2013, 15:37 |
|
#5 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Where? Not in this thread
There is no simpler example Quote:
Code:
variables ( "isSupersonic= .....;" "isInflow= .....;" "superSonicInVal=....;" "subsonicInval=.....;" ); valueExpression=isInflow ? ( isSuperSonic ? superSonicInVal : subsonicInval) : ..."; fractionExpression= isInflow ? ....";
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Lid-Driven cavity flow with SIMPLE method | luckyxu | Main CFD Forum | 6 | November 9, 2011 08:17 |
Comparison between C/C++ and Fortran? | rick | Main CFD Forum | 45 | September 6, 2011 01:52 |
Simple CFD program | John | Main CFD Forum | 0 | March 29, 2003 18:39 |
The computer language for CFD | Ringo | Main CFD Forum | 50 | October 8, 2002 12:14 |
How to write a simple program ?? | kokey | FLUENT | 0 | March 19, 2002 11:21 |