|
[Sponsors] |
[swak4Foam] problem with groovyBC: "word::stripInvalid() called for word r" |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 4, 2012, 10:17 |
problem with groovyBC: "word::stripInvalid() called for word r"
|
#1 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
when I use groovyBC in my run this error is shown.but simple boundary conditions have no error.
error: --------------------------------------------------------------------------------------- fluxScheme: Kurganov Starting time loop Mean and max Courant Numbers = 1.06808 2.25305 deltaT = 1.72414e-07 Time = 1.72414e-07 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 diagonal: Solving for rhoUx, Initial residual = 0, Final residual = 0, No Iterations 0 diagonal: Solving for rhoUy, Initial residual = 0, Final residual = 0, No Iterations 0 swak4Foam: Allocating new repository for sampledGlobalVariables smoothSolver: Solving for Ux, Initial residual = 0.0172088, Final residual = 2.44657e-17, No Iterations 3 smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 3.09454e-15, No Iterations 3 diagonal: Solving for rhoE, Initial residual = 0, Final residual = 0, No Iterations 0 word::stripInvalid() called for word r For debug level (= 2) > 1 this is considered fatal Aborted --------------------------------------------------------------------------------------- my U condition is: --------------------------------------------------------------------------------------- dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { right { type fixedValue; value uniform (0 0 0); } left { type groovyBC; variables "PI=3.1415926535;y_max=max(pts().y);y_min=min(pts( ).y);r=0.06;rpm=3600;omegav=rpm*PI/30;vel_r=r*omegav;tetha_1=11*PI/180;tetha_2=60*PI/180;tetha_3=90*PI/180;time_1=tetha_1/omegav;time_2=tetha_2/omegav;time_3=tetha_3/omegav;pr_01=250000;Tr_01=288;pr_02=100000;Tr_02=2 88;gamma=1.4;R_g=287.14;H_t=gamma*R_g*internalFiel d(T)/(gamma-1)+0.5*pow(mag(internalField(U)),2);R_minus=mag(in ternalField(U))-(2/(gamma-1))*sqrt(gamma*R_g*internalField(T));c_b=(-2*R_minus+sqrt(4*pow(R_minus,2)-4*(1+2/(gamma-1))*((gamma-1)/2)*(pow(R_minus,2)-2*H_t)))/(2+4/(gamma-1));U_b=2*c_b/(gamma-1)+R_minus;time_final=0.005;"; valueFraction "((y_max-pos().y)/vel_r+time_2<=time()&&time()<=time_3)?0:1"; valueExpression "(0<=time()&&time()<=((y_max-pos().y)/vel_r))||(time_1<=time()&&time()<=time_2)||(time_2 <=time()&&time()<=((y_max-pos().y)/vel_r+time_2))||(time_3<=time()&&time()<=time_fina l) ? vector(0,-vel_r,0):vector(U_b,0,0)"; gradientExpression "vector(0,0,0)"; value uniform (0 0 0); //type fixedValue; //value uniform (2 0 0); //type zeroGradient; } //M1=sqrt(((pow((pr_01/p_prime),.2857142857))-1)*(2/(gamma-1))) walls { type fixedValue; value uniform (0 0 0); } empty { type empty; } } --------------------------------------------------------------------------------------- my p is this: --------------------------------------------------------------------------------------- dimensions [1 -1 -2 0 0 0 0]; internalField uniform 1000; boundaryField { right { type zeroGradient; } left { type groovyBC; variables "PI=3.1415926535;y_max=max(pts().y);y_min=min(pts( ).y);r=0.06;rpm=3600;omegav=rpm*PI/30;vel_r=r*omegav;tetha_1=11*PI/180;tetha_2=60*PI/180;tetha_3=90*PI/180;time_1=tetha_1/omegav;time_2=tetha_2/omegav;time_3=tetha_3/omegav;pr_01=250000;Tr_01=288;pr_02=100000;Tr_02=2 88;gamma=1.4;R_g=287.14;H_t=gamma*R_g*internalFiel d(T)/(gamma-1)+0.5*pow(mag(internalField(U)),2);R_minus=mag(in ternalField(U))-(2/(gamma-1))*sqrt(gamma*R_g*internalField(T));c_b=(-2*R_minus+sqrt(4*pow(R_minus,2)-4*(1+2/(gamma-1))*((gamma-1)/2)*(pow(R_minus,2)-2*H_t)))/(2+4/(gamma-1));U_b=2*c_b/(gamma-1)+R_minus;time_final=0.005;"; valueFraction "((0<=time()&&time()<=((y_max-pos().y)/vel_r))||(time_1<=time()&&time()<=time_2)||(time_2 <=time()&&time()<=((y_max-pos().y)/vel_r+time_2))||(time_3<=time()&&time()<=time_fina l)?0:1"; valueExpression "(time()<time_1) ? pr_01*(1+(gamma-1)/2*(U_b/c_b)^2)^(gamma/(gamma-1))r_02*(1+(gamma-1)/2*((sqr(mag(internalField(U))))/(gamma*R_g*internalField(T))))^(-gamma/(gamma-1))"; gradientExpression "0"; value uniform 100000; //type fixedValue; //value uniform 250000; } walls { type zeroGradient; } empty { type empty; } } --------------------------------------------------------------------------------------- and the T boundary condition is: --------------------------------------------------------------------------------------- dimensions [0 0 0 1 0 0 0]; internalField uniform 288; boundaryField { right { type zeroGradient; } left { type groovyBC; variables "PI=3.1415926535;y_max=max(pos().y);y_min=min(pos( ).y); r=.06;rpm=3600;omegav=rpm*PI/30;vel_r=r*omegav;tetha_1=11*PI/180;tetha_2=60*PI/180;tetha_3=90*PI/180;time_1=tetha_1/omegav;time_2=tetha_2/omegav;t_3=tetha_3/omegav;pr_01=250000;Tr_01=288;pr_02=100000;Tr_02=2 88;gamma=1.4;R_g=287.14;H_t=gamma*R_g*internalFiel d(T)/(gamma-1)+0.5*pow((mag(internalField(U))),2);R_minus=mag( internalField(U))-(2/(gamma-1))*sqrt(gamma*R_g*internalField(T));c_b=(-2*R_minus+sqrt(4*pow(R_minus,2)-4*(1+2/(gamma-1))*((gamma-1)/2)*(pow(R_minus,2)-2*H_t)))/(2+4/(gamma-1));U_b=2*c_b/(gamma-1)+R_minus;"; valueFraction "(y_max-y)/vel_r<time()&&time()<time_1)?1:0"; valueExpression "Tr_01/(1+(gamma-1)/2*(U_b/c_b)^2)"; gradientExpression "0"; value uniform 288; |
|
December 4, 2012, 11:35 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
BTW: do yourself a favour and use the list-form for variables (it is much easier to read than the single string: Code:
variables ( "var1=pos();" "var2=mag(var1);" );
__________________
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 |
||
December 4, 2012, 17:44 |
|
#3 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
is it possible to write formulas in more than one line in valueExpression etc too?
|
|
December 4, 2012, 19:21 |
|
#4 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
No. Reason is that OF doesn't support multiline string variables in files (at least to my knowledge).
__________________
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 |
[swak4Foam] groovyBC interFoam splitted inlet -- massflowrate | FerdiFuchs | OpenFOAM Community Contributions | 1 | October 1, 2014 08:51 |
natural convection problem for a CHT problem | Se-Hee | CFX | 2 | June 10, 2007 07:29 |
Adiabatic and Rotating wall (Convection problem) | ParodDav | CFX | 5 | April 29, 2007 20:13 |
Periodic flow boundary condition problem | sudha | FLUENT | 3 | April 28, 2004 09:40 |
extremely simple problem... can you solve it properly? | Mikhail | Main CFD Forum | 40 | September 9, 1999 10:11 |