CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   How to change air density to zero (https://www.cfd-online.com/Forums/openfoam-solving/238005-how-change-air-density-zero.html)

pinpin August 18, 2021 01:32

How to change air density to zero
 
Hi, all

I'm very new about OpenFoam. I followed the damBreak tutorial and
set flow outwards, and flow inwards. Now i wanted to change the air density to zero. But the system show error.
Could anyone tell me how can I change the density to zero ?
Thanks in advance.
English is not my native language; please excuse typing errors.

janibo August 18, 2021 03:30

hi lin,

you could try to switch the equationOfState of thermoType in thermophysicalProperties
to constant rho and then specify rho as 0.

pinpin August 19, 2021 02:41

How to change air density to zero
 
1 Attachment(s)
Hi, janibo
thanks for your suggestions.
I tried to add the thermophysicalProperties file, and also modified the nOuterCorrectors and nNonOrthogonalCorrectprs in PIMPLE, but there were still errors. I don't know what went wrong.


// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


PIMPLE: No convergence criteria found


PIMPLE: No corrector convergence criteria found
Calculations will do 2 corrections


PIMPLE: Operating solver in transient mode with 2 outer correctors


Reading field p_rgh

Reading field U

Reading/calculating face flux field phi

Reading transportProperties

Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian
#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) at ??:?
#4 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<doub le, Foam::fvPatchField, Foam::volMesh> > const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) at ??:?
#5 Foam::incompressibleTwoPhaseMixture::calcNu() at ??:?
#6 Foam::incompressibleTwoPhaseMixture::incompressibl eTwoPhaseMixture(Foam::GeometricField<Foam::Vector <double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) at ??:?
#7 Foam::immiscibleIncompressibleTwoPhaseMixture::imm iscibleIncompressibleTwoPhaseMixture(Foam::Geometr icField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) at ??:?
#8 ? in "/opt/openfoam9/platforms/linux64GccDPInt32Opt/bin/interFoam"
#9 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#10 ? in "/opt/openfoam9/platforms/linux64GccDPInt32Opt/bin/interFoam"
浮點數例外 (核心已傾印)


Could anyone tell me what I miss.
I have attached all the case files at below

shereez234 August 19, 2021 06:00

Quote:

Originally Posted by pinpin (Post 810606)


Could anyone tell me what I miss.
I have attached all the case files at below

I think you have a division by zero error while calculating nu.
Does the case work if you have rho=1e-10 or some other value?

piu58 August 19, 2021 06:34

A fluid with ρ=0 does not exist. You cannot calculate a flow of it.

Tobermory August 25, 2021 07:13

From a momentum perspective, as far as the water (rho = 1000) is concerned, the difference between air (rho ~ 1) and a vacuum (rho = 0) is negligible (ignoring the fact that the water would boil). So, as has been said above, just substitute a low density gas like hydrogen for the air and it will behave like a vacuum.


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