CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (http://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   "field phi not existing or of wrong type" error in replayTransientBC (http://www.cfd-online.com/Forums/openfoam-pre-processing/115776-field-phi-not-existing-wrong-type-error-replaytransientbc.html)

immortality April 6, 2013 11:04

"field phi not existing or of wrong type" error in replayTransientBC
 
this error is shown in performing replayTransienBC:
Code:

reate time

Create mesh for time = 0

Reading field p of type volScalarField
--> FOAM Warning :
    From function polyBoundaryMesh::groupPatchIDs() const
    in file meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C at line 474
    Patch empty specifies a group empty which is also a patch name. This might give problems later on.
Reading field T of type volScalarField
Reading field U of type volVectorField
--> FOAM Warning :
    From function replayTransientBC
    in file replayTransientBC.C at line 184
    No list 'preloadFields' defined. Boundary conditions that depend on other fields will fail
Time = 5.6e-09

deltaT = 5.6e-09
swak4Foam: Allocating new repository for sampledGlobalVariables
--> FOAM Warning :
    From function ConcretePluginFunction<DriverType>::exists
    in file lnInclude/ConcretePluginFunction.C at line 111
    Constructor table of plugin functions for PatchValueExpressionDriver is not initialized


--> FOAM FATAL ERROR:
 Parser Error for driver PatchValueExpressionDriver at "1.304-306" :"field phi not existing or of wrong type"
"(t1<time()&&time()<t1+c1)||(t2<time()&&time()<t2+c1)||(t3<time()&&time()<t3+c1)||(t4<time()&&time()<t4+c1)||(t5<time()&&time()<t5+c1)||(t6<time()&&time()<t6+c1)||(t7<time()&&time()<t7+c1)||(t8<time()&&time()<t8+c1)||(t9<time()&&time()<t9+c1)||(t10<time()&&time()<t10+c1)||(t11<time()&&time()<t11+c1)? ((phi<0)?p0_3*pow(part3,3.5):p0_3/pow(part_outflow,3.5)) : ((phi<=0)?p0_1*pow(part1,3.5):p0_1/pow(part_outflow,3.5))"
                                                                                                                                                                                                                                                                                                                ^^^
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| 

Context of the error:


- From dictionary: /home/ehsan/Desktop/Nazeri/0/p.boundaryField.left
  Evaluating expression "(t1<time()&&time()<t1+c1)||(t2<time()&&time()<t2+c1)||(t3<time()&&time()<t3+c1)||(t4<time()&&time()<t4+c1)||(t5<time()&&time()<t5+c1)||(t6<time()&&time()<t6+c1)||(t7<time()&&time()<t7+c1)||(t8<time()&&time()<t8+c1)||(t9<time()&&time()<t9+c1)||(t10<time()&&time()<t10+c1)||(t11<time()&&time()<t11+c1)? ((phi<0)?p0_3*pow(part3,3.5):p0_3/pow(part_outflow,3.5)) : ((phi<=0)?p0_1*pow(part1,3.5):p0_1/pow(part_outflow,3.5))"


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

FOAM exiting

replayTransientBCDict i added is:
Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

fields (
    p
    T
    U
    phi
);

a BC that error is on it,is so:
Code:

left
    {
        type groovyBC;

        variables (

                  "r=0.02325;"
                  "rpm=32151;"
                  "omega=rpm*pi/30;"
                  "v_r=r*omega;"
                  "w_cell=.004;"
                  "n=1;"
                 
                  "w_w0=n*w_cell;"
                  "w_w1=(126.63-48.03240742)*r*pi/180;"
                  "w_w2=(180-160.28)*r*pi/180;"
                  "w_p1=(160.28-126.63)*r*pi/180;"
                  "w_p3=(48.03240742-0)*r*pi/180;"//(46-0)

                  "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;"
                  "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;"//932190
                  "T0_3=1248;"
                  "gamma=1.4;"
                  "R=287.14;"
                  "part_outflow=1+(gamma-1)/2*magSqr(internalField(U))/(gamma*R*T);"
                  "part1=1-(gamma-1)*magSqr(internalField(U))/(2*gamma*R*T0_1);"
                  "part3=1-(gamma-1)*magSqr(internalField(U))/(2*gamma*R*T0_3);"
                 
);

   
       
      fractionExpression "(t1<time()&&time()<t1+c1)||(t1+c2<time()&&time()<t1+c3)||(t2<time()&&time()<t2+c1)||(t2+c2<time()&&time()<t2+c3)||(t3<time()&&time()<t3+c1)||(t3+c2<time()&&time()<t3+c3)||(t4<time()&&time()<t4+c1)||(t4+c2<time()&&time()<t4+c3)||(t5<time()&&time()<t5+c1)||(t5+c2<time()&&time()<t5+c3)||(t6<time()&&time()<t6+c1)||(t6+c2<time()&&time()<t6+c3)||(t7<time()&&time()<t7+c1)||(t7+c2<time()&&time()<t7+c3)||(t8<time()&&time()<t8+c1)||(t8+c2<time()&&time()<t8+c3)||(t9<time()&&time()<t9+c1)||(t9+c2<time()&&time()<t9+c3)||(t10<time()&&time()<t10+c1)||(t10+c2<time()&&time()<t10+c3)||(t11<time()&&time()<t11+c1)||(t11+c2<time()&&time()<t11+c3)?1:0";
      valueExpression "(t1<time()&&time()<t1+c1)||(t2<time()&&time()<t2+c1)||(t3<time()&&time()<t3+c1)||(t4<time()&&time()<t4+c1)||(t5<time()&&time()<t5+c1)||(t6<time()&&time()<t6+c1)||(t7<time()&&time()<t7+c1)||(t8<time()&&time()<t8+c1)||(t9<time()&&time()<t9+c1)||(t10<time()&&time()<t10+c1)||(t11<time()&&time()<t11+c1)? ((phi<0)?p0_3*pow(part3,3.5):p0_3/pow(part_outflow,3.5)) : ((phi<=0)?p0_1*pow(part1,3.5):p0_1/pow(part_outflow,3.5))";
      value uniform 303975;//932190
      gradientExpression "0";
       
    }


immortality April 7, 2013 13:53

whats wrong about it?

immortality April 7, 2013 17:41

could some one make any help?

immortality April 8, 2013 05:48

i have added phi in the dictionary but it gives the error yet.
why replayTransientBC doesn't know the field of phi or trouble is on anything else?

immortality April 9, 2013 05:06

I'm waiting to answer please help !

immortality April 9, 2013 10:06

dear Mr.Gschaider could you help me please?
ps:maybe this is such a hard problem that he doesn't know anything related,isn't it so?:D


All times are GMT -4. The time now is 18:31.