CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

"field phi not existing or of wrong type" error in replayTransientBC

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 6, 2013, 11:04
Default "field phi not existing or of wrong type" error in replayTransientBC
  #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
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 is offline   Reply With Quote

Old   April 7, 2013, 13:53
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
whats wrong about it?
immortality is offline   Reply With Quote

Old   April 7, 2013, 17:41
Smile
  #3
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
could some one make any help?
immortality is offline   Reply With Quote

Old   April 8, 2013, 05:48
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
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 is offline   Reply With Quote

Old   April 9, 2013, 05:06
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
I'm waiting to answer please help !
immortality is offline   Reply With Quote

Old   April 9, 2013, 10:06
Default
  #6
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
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?

Last edited by immortality; April 11, 2013 at 08:47.
immortality is offline   Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
udf error srihari FLUENT 1 October 31, 2016 14:18
mixerVesselAMI2D's mass is not balancing sharonyue OpenFOAM Running, Solving & CFD 6 June 10, 2013 09:34
[swak4Foam] "field U not existing or of wrong type" groovyBC error. immortality OpenFOAM Community Contributions 1 February 4, 2013 15:08


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