
[Sponsors] 
June 1, 2012, 21:08 
Boundary Condition for granular temperature Theta

#1 
Member
Charlie
Join Date: Dec 2010
Location: 415 Kinross Dr. Newark, DE 19711
Posts: 80
Rep Power: 7 
Hi,
I'm using twoPhaseEulerFoam, including the kinetic theory. I've decided to create a file to solve the PDE for Theta, i.e the granular temperature, that is, I don't want to use the existing kinetic theory in OpenFOAM, basically, the work is done, and the compilation is OK, however, when I tried to run a case, the error message came out. The following is how I did that, it's simple, I just create a *.H file, which contain the fvScalarMatrix for Theta: /**************************/ fvScalarMatrix ThetaEqn ( fvm::ddt(ss,Theta) + ... == ... ); ThetaEqn.relax(); ThetaEqn.solve(); /****************************/ The compilation is OK, and the initial file for Theta is defined as: walls { type fixedValue; uniform 0; } inandouthalf11 { type cyclic; } inandouthalf12 { type cyclic; } inandouthalf21 { type cyclic; } inandouthalf22 { type cyclic; } top { type fixedValue; uniform 0; } frontAndBackPlanes { type empty; } /************************************************** ******/ However, When I tried to run the case, the error message is that : > FOAM FATAL ERROR: gradientInternalCoeffs cannot be called for a calculatedFvPatchField on patch top of field Theta in file "/*/*/*/*/0/Theta" You are probably trying to solve for a field with a default boundary condition. From function calculatedFvPatchField<Type>::gradientInternalCoef fs() const in file fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C at line 186. FOAM exiting It seems that the problem is that I didn't define the boundary condition, however, I'm basically following Alberto's work on the boundary condition, that is JohnsonJackson's boundary condition, should I include the boundary condition explicitly in the theta equation file? Does anyone has that kind of experience? Thanks! 

June 1, 2012, 23:15 
Problem solved

#2 
Member
Charlie
Join Date: Dec 2010
Location: 415 Kinross Dr. Newark, DE 19711
Posts: 80
Rep Power: 7 
Never mind, it's just due to a stupid mistake,
in createField.H, I initiate Theta in a wrong way, it should be: volScalarField Theta ( IOobject ( "Theta", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh // mesh, // dimensionedScalar("zero", dimensionSet(0, 2, 2, 0, 0), 0.0) ); cheers! 

July 4, 2016, 15:44 

#3 
Senior Member
Join Date: Jan 2013
Posts: 297
Rep Power: 6 
Dear Charlie,
How did you specify the boundary value of Theta for the inlet of the computational domain? I found that in my case the iteration step is always high (such as 50, at the first time step it is 1000). Do you also have the same situations? best regards, OF 

July 4, 2016, 16:00 
BC for Theta at inlet

#4 
Member
Charlie
Join Date: Dec 2010
Location: 415 Kinross Dr. Newark, DE 19711
Posts: 80
Rep Power: 7 
Hi OF,
I used zeroGradient for Theta at the inlet, and it worked fine. Also, a good initial condition for Theta field also helps! Best Charlie 

July 4, 2016, 16:08 

#5 
Senior Member
Join Date: Jan 2013
Posts: 297
Rep Power: 6 
Hi Charlie,
Thank you. What kind of initial field for Theta did you specify? My case is particle laden flows with inlet particle volume fraction = 4e4. I am considering if I need to use kineticTheoryModel for the particle turbulence. Is your case also gasparticle flows? What is the volume fraction, so you are using Theta? Thank you. 

Tags 
boundary conditions, kinetic theory, two fluid model 
Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Temperature dependant mixed Boundary condition  argonaut  OpenFOAM PreProcessing  2  February 15, 2011 12:02 
External Radiation Boundary Condition (Two sided wall), Grid Interface  CFD XUE  FLUENT  0  July 8, 2010 06:49 
How to apply the temperature boundary condition on the outside of the mould?  alefem  FLOW3D  5  May 25, 2010 05:32 
Pressure Boundary Condition  Matt Umbel  Main CFD Forum  0  January 11, 2002 11:06 
boundary condition : temperature  J.D.Yoon  FLUENT  1  August 29, 2000 04:08 