CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   no change in solution by change in groovyBC variables (http://www.cfd-online.com/Forums/openfoam-solving/112377-no-change-solution-change-groovybc-variables.html)

immortality January 27, 2013 17:30

no change in solution by change in groovyBC variables
 
at my boundary condition when I change w_w3 from 23.6 until 50 degree nothing is changed in solution and the right patch opens to environment at time that is was opened before change.it seems that it is ignored although w_w3 is used in t1 constant and it should have affected on (0<=time()&&time()<=t1) part of condition.why it occurs?
thanks.
this is the BC on U:

Code:

right
    {
        type groovyBC;

        variables (

                  //"pi=3.1415926535;"
                  "ymax=max(pos().y);"
                  "ymin=min(pos().y);"
                  "r=0.02325;"
                  "rpm=32151;"
                  "omega=rpm*pi/30;"
                  "v_r=r*omega;"
                  "w_cell=.004;"
                  "n=1;"
                 
                  "w_w0=n*w_cell;"
                  "w_w3=(50-0)*r*pi/180;"
                  "w_w4=(83-61.6)*r*pi/180;"
                  "w_w5=(180-128)*r*pi/180;"
                  "w_p2=(71.1-21.6)*r*pi/180;"
                  "w_p4=(129-84)*r*pi/180;"
               
                  "c1=w_p2/v_r;"
                  "c2=(w_p2+w_w4)/v_r;"
                  "c3=(w_p2+w_w4+w_p4)/v_r;"
                  "c4=(w_p2+w_w4+w_p4+w_w5+w_w3)/v_r;"
                  "t1=(w_w0+w_w3-pos().y)/v_r;"
                  "t2=t1+c4;"
                  "t3=t1+2*c4;"
                  "t4=t1+3*c4;"
                  "t5=t1+4*c4;"
                  "t6=t1+5*c4;"
                  "t7=t1+6*c4;"
                  "t8=t1+7*c4;"
                  "t9=t1+8*c4;"
                  "t10=t1+9*c4;"
                  "t11=t1+10*c4;"
                 
                  "p0_1=303975;"
                  "T0_1=440;"
                  "p0_3=932190;"
                  "T0_3=1248;"
                  "p0_2=1023382.5;"
                  "T0_4=973;"
                  "gamma=1.4;"
                  "R=287.14;"
                 

);

        fractionExpression "((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))?1:0";
        valueExpression "vector(0,-v_r,0)";
        gradientExpression "vector(0,0,0)";
        value uniform (0 -78.27914269 0);
    }


immortality January 28, 2013 03:38

does anyone see a trouble in this BC?the long terms should not be frighteninng.they're simple!

gschaider January 28, 2013 08:34

Quote:

Originally Posted by immortality (Post 404447)
does anyone see a trouble in this BC?the long terms should not be frighteninng.they're simple!

Nevertheless: make them simpler (only put one intervall into fractionExpression for instance). Also: try putting the variables used (t1 and c4 I think) into the valueExpression to see if they really have the values they're supposed to have)


All times are GMT -4. The time now is 14:29.