|
[Sponsors] |
whats the error?syntax error, unexpected TOKEN_LEQ |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 28, 2013, 09:59 |
whats the error?syntax error, unexpected TOKEN_LEQ
|
#1 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26 |
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); |
|
February 28, 2013, 10:28 |
|
#2 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26 |
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 |
|
February 28, 2013, 10:55 |
|
#3 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37 |
Hi Ehsan,
It looks like you take the square root to a negative number. Kind regards, Niels |
|
February 28, 2013, 11:13 |
|
#4 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26 |
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. |
|
March 8, 2013, 04:13 |
|
#5 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26 |
any hint if exists in someone?
|
|
Thread Tools | Search this Thread |
Display Modes | |
|
|