|
[Sponsors] |
[swak4Foam] how can extend character limitation of expressions in groovyBC? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 19, 2013, 16:22 |
how can extend character limitation of expressions in groovyBC?
|
#1 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
I have a long expression for condition on time but it exceeds from groovyBC limitation in 0.2.0 version.how to extend this limit or solve this problem?
Code:
--> FOAM FATAL IO ERROR: string "((0<=time()&&time()<=t1)||(t1+c1<=time()&&time()<=t1+c2)||(t1+c3<=time()&&time()..." is too long (max. 1024 characters) file: /home/ehsan/Desktop/Thesis_Pimple/WR_Pimple/0/U at line 125. From function ISstream::read(string&) in file db/IOstreams/Sstreams/ISstream.C at line 531. FOAM exiting |
|
February 19, 2013, 17:11 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Either - look for the limit somewhere in $FOAM_SRC/OpenFOAM, increase it and recompile OpenFOAM - split your expression into something more manageable with variables Second solution is recommended
__________________
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 20, 2013, 00:13 |
|
#3 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
really? I was thinking you are one of providers of OF but you had not know about that?
I found it and am going to compile.because my expression is a set of conditions.how do you think i can reduce conditions?can they be defined in variables?it shows an error on not knowing them when i define logical conditions in variable list as i propound in other thread. |
|
February 20, 2013, 12:42 |
|
#4 | ||
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Quote:
__________________
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 20, 2013, 12:56 |
|
#5 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
a brief expression as instance is as below.how can it be set in variables?(you mean thw conditions or expressions by "branches"?)(my conditions are verbose not expressions)
Code:
valueExpression "((0<=time()&&time()<=t1)||(t1+c1<=time()&&time()<=t1+c2)||(t1+c3<=time()&&time()<=t1+c4)||(t2+c1<=time()&&time()<=t2+c2)||(t2+c3<=time()&&time()<=t2+c4)||(t3+c1<=time()&&time()<=t3+c2)||(t3+c3<=time()&&time()<=t3+c4)||(t4+c1<=time()&&time()<=t4+c2)||(t4+c3<=time()&&time()<=t4+c4)||(t5+c1<=time()&&time()<=t5+c2)||(t5+c3<=time()&&time()<=t5+c4)||(t6+c1<=time()&&time()<=t6+c2)||(t6+c3<=time()&&time()<=t6+c4)||(t7+c1<=time()&&time()<=t7+c2)||(t7+c3<=time()&&time()<=t7+c4)||(t8+c1<=time()&&time()<=t8+c2)||(t8+c3<=time()&&time()<=t8+c4)||(t9+c1<=time()&&time()<=t9+c2)||(t9+c3<=time()&&time()<=t9+c4)||(t10+c1<=time()&&time()<=t10+c2)||(t10+c3<=time()&&time()<=t10+c4)||(t11+c1<=time()&&time()<=t11+c2)||(t11+c3<=time()&&time()<=t11+c4))?vector(0,v_r,0):mag(internalField(U).x)*normal()"; |
|
November 3, 2015, 12:19 |
|
#6 |
New Member
Pas
Join Date: Nov 2015
Posts: 1
Rep Power: 0 |
Hello,
I am bringing out from the shadows this old post because I am facing the same problem. In fact, I increased the length of string into /opt/openfoam240/src/OpenFOAM/db/IOstreams/Sstreams/ISstream.C file to impose a time-dependent (and x- y-dependent) inlet BC using groovyBC. However, I did not manage to re-compile OpenFOAM by running ./Allwmake in the /opt/openfoam240/ directory. With the superuser privileges, I have the following error: Error: Current directory is not $WM_PROJECT_DIR The environment variables are inconsistent with the installation. Check the OpenFOAM entries in your dot-files and source them. What do I have to do to take into account the changes made in ISstream.C file? Regards. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] groovyBC and funkySetFields married and got a kid named swak4Foam | gschaider | OpenFOAM Community Contributions | 169 | August 10, 2023 10:01 |
[swak4Foam] reactingMultiPhaseEulerFoam problems with groovyBC | zanilu70 | OpenFOAM Community Contributions | 4 | December 13, 2016 07:46 |
[swak4Foam] Change in alpha and U with groovyBC in twoPhaseEulerFoam | dani2702 | OpenFOAM Community Contributions | 0 | November 17, 2016 04:30 |
Ansys Fluent 13.0 UDF compilation problem in Window XP (32 bit) | Yogini | Fluent UDF and Scheme Programming | 7 | October 3, 2012 08:24 |
[Gmsh] Character expressions in gmsh? | ericnutsch | OpenFOAM Meshing & Mesh Conversion | 0 | January 22, 2010 00:21 |