how can extend character limitation of expressions in groovyBC?
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: |
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 |
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. |
Quote:
Quote:
|
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()"; |
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. |
All times are GMT -4. The time now is 09:53. |