CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   problems when using sonicFoam with subsonic inlet BC (https://www.cfd-online.com/Forums/openfoam-pre-processing/150017-problems-when-using-sonicfoam-subsonic-inlet-bc.html)

JasonWang3 March 13, 2015 05:50

problems when using sonicFoam with subsonic inlet BC
 
Hi

I am using sonicFoam with a subsonic inletBC, since the top inlet in the y direction is subsonic.
pressure
top
{
type totalPressure;
p0 uniform 6e5;
phi phi;
rho none;
psi psi;
gamma 1.4;
}
temperature
type totalTemperature;
T0 uniform 300;
gamma 1.4;
velocity
top
{
type zeroGradient;
}
But when running , some errors happen like this:
---------------------------------------------------------------------------------------------
--> FOAM FATAL ERROR:

request for volScalarField psi from objectRegistry region0 failed
available objects of type volScalarField are

17
(
thermo:mu
thermo:psi
K
K_0
rho
k
(1|A(U))
thermo:psi_0
e_0
alphat
rho_0
p
T
e
mut
epsilon
thermo:alpha
)


From function objectRegistry::lookupObject<Type>(const word&) const
in file /home/openfoam/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 198.
-------------------------------------------------------------------------------------------------------
Is there anyone facing the same problems?

mateiu2003k June 20, 2015 20:56

Hi Xinguang,

I faced the same problem but in an opposite manner. Depending on the OF version keyword's values are changing. So from OF 2.1.x to OF 2.2.x for the keyword psi the value changed from psi to thermo:psi (my guess). The error message the you got is very similar to mine. From the choices given I recognize thermo:psi which I use without trouble for sonicFoam in OF 2.2.x but when I have tried it in OF 2.1.x on my old laptop it bugged and got a similar error message to yours ->

--> FOAM FATAL ERROR:

request for volScalarField thermo:psi from objectRegistry region0 failed
available objects of type volScalarField are

12
(
psi
rho
psi_0
(1|A(U))
(rho*(1|A(U)))
e_0
alpha
rho_0
p
T
e
mu
)


From function objectRegistry::lookupObject<Type>(const word&) const
in file /home/opencfd/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 131.




Let me know if this fixes your problem.

Best,
Matei.

JasonWang3 June 22, 2015 04:55

Hi Matei

I have not found how to solve this situation. Instead, I use the static pressure and temperature, and my results seem good now.

Best,
Xinguang


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