CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

whats the error?syntax error, unexpected TOKEN_LEQ

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 28, 2013, 09:59
Default whats the error?syntax error, unexpected TOKEN_LEQ
  #1
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
I have define M1 that means when Mach=1,but this error occurs,why?
Code:
Create time

Create mesh for time = 0


PIMPLE: max iterations = 2
    field "(p|U|k|omega)"	: relTol 0, tolerance 1e-10

Reading thermophysical properties

Selecting thermodynamics package hPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>
Reading field U

Reading/calculating face flux field phi

Creating turbulence model

Selecting turbulence model type laminar
Creating field dpdt

Creating field kinetic energy K


Starting time loop

Courant Number mean: 3.839182789e-20 max: 4.136719455e-16
deltaT = 6.711409396e-09
Time = 6.71141e-09

diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
PIMPLE: iteration 1
swak4Foam: Allocating new repository for sampledGlobalVariables


--> FOAM FATAL ERROR: 
 Parser Error at "1.127-128" :"syntax error, unexpected TOKEN_LEQ"
"((0<=time()&&time()<=t1)||(t1+c1<=time()&&time()<=t1+c2)||(t1+c3<=time()&&time()<=t1+c4))?v_w:((t1<time()&&time()<t1+c1)?((v_3<=M1)?(M1-10):v_3):((v_1<=M1)?(M1-10):v_1))"
"                                                                                                                               ^^                                        "

    From function parsingValue
    in file lnInclude/CommonValueExpressionDriverI.H at line 802.

FOAM exiting
Code:
 left
    {
        //type zeroGradient;
        type groovyBC;

        variables (

                 
                  "r=0.02325;"
                  "rpm=28000;"
                  "omega=rpm*pi/30;"
                  "v_r=r*omega;"
                  "w_cell=.004;"
                  "n=2;"
                  
                  "w_w0=n*w_cell;"
                  "w_w1=(116.63-46)*r*pi/180;"
                  "w_w2=(180-160.28)*r*pi/180;"
                  "w_p1=(160.28-116.63)*r*pi/180;"
                  "w_p3=(46-0)*r*pi/180;"
                
                  "c1=w_p3/v_r;"
                  "c2=(w_p3+w_w1)/v_r;"
                  "c3=(w_p3+w_w1+w_p1)/v_r;"
                  "c4=(w_p3+w_w1+w_p1+w_w2)/v_r;"
                  "t1=(w_w0-pos().y)/v_r;"

                  "p0_1=303975;"
                  "p0_3=932190;"
                  "T0_1=440;"
                  "T0_3=1248;"
                  "gamma=1.4;"
                  "R=287.14;"

                  "v_w=vector(0,-v_r,0);"
                  "v_3=sqrt(2*gamma*R*T0_3/(gamma-1)*(1-pow(internalField(p)/p0_3,0.2857142857)))*normal();"
                  "v_1=sqrt(2*gamma*R*T0_1/(gamma-1)*(1-pow(internalField(p)/p0_1,0.2857142857)))*normal();"
                   "M1=sqrt(gamma*R*internalField(T));"
                  

);

        valueExpression "((0<=time()&&time()<=t1)||(t1+c1<=time()&&time()<=t1+c2)||(t1+c3<=time()&&time()<=t1+c4))?v_w:((t1<time()&&time()<t1+c1)?((v_3>=M1)?(M1-10):v_3):((v_1>=M1)?(M1-10):v_1))";
        value uniform (0 -68.17256058 0);
immortality is offline   Reply With Quote

Old   February 28, 2013, 10:28
Default
  #2
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
that resolved.i modified it by mag(M1) and mag(velocities)
but there is another error:
Code:
Courant Number mean: 3.839182789e-20 max: 4.136719455e-16
deltaT = 6.711409396e-09
Time = 6.71141e-09

diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
PIMPLE: iteration 1
swak4Foam: Allocating new repository for sampledGlobalVariables
DILUPBiCG:  Solving for Ux, Initial residual = 0.9999999256, Final residual = 6.172563648e-21, No Iterations 2
DILUPBiCG:  Solving for Uy, Initial residual = 1, Final residual = 4.121122091e-21, No Iterations 2
DILUPBiCG:  Solving for h, Initial residual = 0.9158715567, Final residual = 8.735488197e-21, No Iterations 2
FDICPCG:  Solving for p, Initial residual = 0.9999927496, Final residual = 1.814175001e-20, No Iterations 3
FDICPCG:  Solving for p, Initial residual = 4.171963964e-06, Final residual = 7.634877292e-19, No Iterations 2
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 9.313716307e-17, global = 3.761712002e-17, cumulative = 3.761712002e-17
rho max/min : 2.406296835 2.40629655
#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::sigFpe::sigHandler(int) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2   in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::sqrt(Foam::Field<double>&, Foam::UList<double> const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#4  Foam::sqrt(Foam::UList<double> const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#5  parserPatch::PatchValueExpressionParser::parse() in "/home/ehsan/OpenFOAM/ehsan-2.1.1/platforms/linux64GccDPOpt/lib/libswak4FoamParsers.so"
#6  Foam::PatchValueExpressionDriver::parse(std::string const&) in "/home/ehsan/OpenFOAM/ehsan-2.1.1/platforms/linux64GccDPOpt/lib/libswak4FoamParsers.so"
#7  Foam::CommonValueExpressionDriver::evaluateVariable(Foam::word const&, Foam::string const&) in "/home/ehsan/OpenFOAM/ehsan-2.1.1/platforms/linux64GccDPOpt/lib/libswak4FoamParsers.so"
#8  Foam::CommonValueExpressionDriver::addVariables(Foam::string const&, bool) in "/home/ehsan/OpenFOAM/ehsan-2.1.1/platforms/linux64GccDPOpt/lib/libswak4FoamParsers.so"
#9  Foam::CommonValueExpressionDriver::addVariables(Foam::List<Foam::string> const&, bool) in "/home/ehsan/OpenFOAM/ehsan-2.1.1/platforms/linux64GccDPOpt/lib/libswak4FoamParsers.so"
#10  Foam::CommonValueExpressionDriver::clearVariables() in "/home/ehsan/OpenFOAM/ehsan-2.1.1/platforms/linux64GccDPOpt/lib/libswak4FoamParsers.so"
#11  Foam::groovyBCFvPatchField<Foam::Vector<double> >::updateCoeffs() in "/home/ehsan/OpenFOAM/ehsan-2.1.1/platforms/linux64GccDPOpt/lib/libgroovyBC.so"
#12  Foam::mixedFvPatchField<Foam::Vector<double> >::evaluate(Foam::UPstream::commsTypes) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#13  Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::evaluate() in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/rhoPimpleFoam"
#14
in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/rhoPimpleFoam"
#15  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#16
in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/rhoPimpleFoam"
Floating point exception
immortality is offline   Reply With Quote

Old   February 28, 2013, 10:55
Default
  #3
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Ehsan,

It looks like you take the square root to a negative number.

Kind regards,

Niels
ngj is offline   Reply With Quote

Old   February 28, 2013, 11:13
Default
  #4
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
thanks dear Niels
at starting the fluid in the pipe should be at rest but because of this error i thought it may be due to zero internal velocity at first and set it to (0 0 0).
now it starts but after some hundred iterations residual of Ux starting to increase and it crashes.
i'll be glad if you take a look to residuals and courant
are they Ok?they seem odd!
thanks.
Attached Images
File Type: png linear.png (3.9 KB, 5 views)
File Type: png courant.png (3.5 KB, 5 views)
File Type: png cont.png (7.7 KB, 5 views)
immortality is offline   Reply With Quote

Old   March 8, 2013, 04:13
Default
  #5
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
any hint if exists in someone?
immortality is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 01:15.