
[Sponsors] 
October 26, 2009, 15:34 
trouble with totalTemperature BC

#1 
New Member
Paul Garlick
Join Date: Mar 2009
Location: Bournemouth, UK
Posts: 27
Rep Power: 10 
I am using OF1.5 and rhopSonicFoam for a compressible external flow case. On the far field boundary I would like to apply a totalTemperature boundary condition:
topBoundary { type totalTemperature; T0 uniform 300; U U; phi phi; psi psi; gamma 1.4; value uniform 300; } I find that solver aborts with the following message: request for volVectorField U from objectRegistry region0 failed available objects of type volVectorField are 0 ( ) I have found that a totalPressure boundary condition (with fixedValue for T) runs for a short time before inflow leads to rapid divergence. In the source files for totalPressure and totalTemperature I see that the vector field for velocity is accessed in a different way in each case: For totalTemperatureFvPatchScalarField.C: const fvPatchVectorField& Up = patch().lookupPatchField<volVectorField, vector>(UName_); For totalPressureFvPatchScalarField.C: void totalPressureFvPatchScalarField::updateCoeffs() { updateCoeffs(patch().lookupPatchField<volVectorField, vector>(UName_)); } Can anyone explain why the former BC fails and the latter succeeds; and even suggest a solution? Many thanks. 

October 27, 2009, 11:15 

#2 
New Member
Paul Garlick
Join Date: Mar 2009
Location: Bournemouth, UK
Posts: 27
Rep Power: 10 
More information ...
I noticed from the log file (for rhopSonicFoam > log) that the totalTemperature BC causes the solver to abort after writing the message: Reading field T This message comes from the header file "createFields.H". There is a function T.correctBoundaryConditions() that is called before the vector field for U is established. The fields are created in the order p, T, psi, rho, U, rhoU, rhoE, phiv. My question is; may I rearrange the code so that the vector field for U is created before T.correctBoundaryConditions() is called? The order could be p, U, T, psi, rho, rhoU, rhoE, phiv, for example. 

October 28, 2009, 14:28 

#3 
New Member
Andrew Godfrey
Join Date: Mar 2009
Posts: 7
Rep Power: 10 
Sorry, I can't help any, but I'm clawing my way through these bcs also. Any idea what psi and phi represent? I assume phi is the mass flux vector (rho U). Also, in the code, there's a 1  pos(phip). Any idea where pos() is defined or what it does?


October 28, 2009, 14:38 

#4 
New Member
Andrew Godfrey
Join Date: Mar 2009
Posts: 7
Rep Power: 10 

October 28, 2009, 16:54 

#5 
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,020
Rep Power: 43 
phip: phi on a patch. The definition of phi (mass flow on the face) has been discussed a number of times. Sign says whether it's flowing in or out


October 28, 2009, 21:18 

#6 
New Member
Andrew Godfrey
Join Date: Mar 2009
Posts: 7
Rep Power: 10 
Thanks Berhard. Saw several of your talks in Montreal last June. I figured the phi part out after the post. From the code, psi must equal rho/p, but I don't know why or how this bc's dictionary works. Why is U part of the class?


October 29, 2009, 05:39 

#7 
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,020
Rep Power: 43 
Never worked with that boundary condition. But I guess for multiphasesolvers where more than one velocities exist


October 29, 2009, 06:49 

#8 
New Member
Paul Garlick
Join Date: Mar 2009
Location: Bournemouth, UK
Posts: 27
Rep Power: 10 
Have made some progress with this problem...
First, I reordered the creation of the fields defined in "createFields.H". I used the order I mentioned above; p. U, T, psi, rho, rhoU, rhoE, phiv. I recompiled and found that the solver aborted again, this time on searching for the scalar field phi. Then I moved the T.correctBoundaryConditions() function down in the file, to the line below rhoU.correctBoundaryConditions(). I recompiled and the solver ran successfully. However, in order to update the boundary condition after each time step one extra change is needed: in rhopSonicFoam.C I added the update function just below the expression for U; U=rhoU/rho; T.correctBoundaryConditions(); I have recompiled rhopSonicFoam and it works fine; the temperature at the far field boundary is adjusted as pressure waves move through and the local velocity changes. To answer the question on why U is involved, the totalTemperature function is simply an expression of the energy equation; as the velocity increases the temperature drops. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
[GAMBIT] Trouble meshing complex VOF geometry  RPJones  ANSYS Meshing & Geometry  2  February 14, 2011 19:54 
Finned Pipe Trouble  fabioxyz  CFX  8  August 31, 2009 02:20 
trouble with squeezing mesh  adrianahscott  OpenFOAM Running, Solving & CFD  0  August 29, 2009 07:25 
Epsilon Convergence Trouble  Carlos  FLUENT  4  August 27, 2007 11:22 
Could anybody help the trouble of the modifying the U  liugx212  OpenFOAM Running, Solving & CFD  2  February 27, 2006 11:23 