CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Emptying of a tank

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   January 4, 2014, 08:17
Default Emptying of a tank
  #1
New Member
 
erik gustafsson
Join Date: Oct 2013
Posts: 19
Rep Power: 5
guserik is on a distinguished road
I want to simulate emptying of an air tank with 30L of air and initial pressure of 9 bar through a valve. The remaining boundary conditions on the otherside of the valve is atm pressure. Which solver and boundary condition is most approperiate for this? From the results im interested in pressure and velocities. The flow is completely driven of pressure difference and first thought was to use pisoFoam or pimpleFoam, but my main concerns is how to implement the boundary conditions.

Thanks in adavance!
guserik is offline   Reply With Quote

Old   January 20, 2014, 04:08
Default
  #2
New Member
 
Christian Wokl
Join Date: Mar 2012
Posts: 19
Rep Power: 6
Wokl is on a distinguished road
Hey,

i'm sorry for not being able to answer ur which solver to take question. Both should work imho.

The boundary conditions i'd take for pressure: outlet (atmosphere?): totalpressure and for velocity pressureInletOutletVelocity

wall: pressure: zeroGradient, velocity: fixedValue

since i'm also pretty new to openfoam i hope i could help a little. For better help i guess u should give a little more information. I don't have the link now, but there's a thread explaining how to give enough information.

if u have already solved ur problem, then this answer can be ignored
Wokl is offline   Reply With Quote

Old   January 20, 2014, 04:45
Default
  #3
New Member
 
erik gustafsson
Join Date: Oct 2013
Posts: 19
Rep Power: 5
guserik is on a distinguished road
Quote:
Originally Posted by Wokl View Post
Hey,

i'm sorry for not being able to answer ur which solver to take question. Both should work imho.

The boundary conditions i'd take for pressure: outlet (atmosphere?): totalpressure and for velocity pressureInletOutletVelocity

wall: pressure: zeroGradient, velocity: fixedValue

since i'm also pretty new to openfoam i hope i could help a little. For better help i guess u should give a little more information. I don't have the link now, but there's a thread explaining how to give enough information.

if u have already solved ur problem, then this answer can be ignored

Thanks for the suggetsion, i have a air tank where i set my pressure to 9 bar then i have a section with the valve and the outlet. On the outlet the static pressure is set to 1 bar and the remaining section have an initial pressure at 9 bar. I use rhoPimpleFoam as the solver. In my case i do not have any inlet.
guserik is offline   Reply With Quote

Old   January 20, 2014, 05:14
Default
  #4
New Member
 
Christian Wokl
Join Date: Mar 2012
Posts: 19
Rep Power: 6
Wokl is on a distinguished road
have u already tried running the simulation? Any errors occured?
Wokl is offline   Reply With Quote

Old   January 20, 2014, 06:06
Default
  #5
New Member
 
erik gustafsson
Join Date: Oct 2013
Posts: 19
Rep Power: 5
guserik is on a distinguished road
Quote:
Originally Posted by Wokl View Post
have u already tried running the simulation? Any errors occured?
Yes i implemented everything as you suggestions but i got this problem as well

From function janafThermo<EquationOfState>::limit(const scalar T) const
in file /disk/sw/OpenFOAM/OpenFOAM-2.2.2/src/thermophysicalModels/specie/lnInclude/janafThermoI.H at line 108
attempt to use janafThermo<EquationOfState> out of temperature range 200 -> 6000; T = -9594.63


it seems like my temperature diverge completely.

I include my files i dont know if you can see any critical issues. Thanks for the support =)
Attached Files
File Type: zip files.zip (12.3 KB, 7 views)
guserik is offline   Reply With Quote

Old   January 20, 2014, 06:53
Default
  #6
New Member
 
Christian Wokl
Join Date: Mar 2012
Posts: 19
Rep Power: 6
Wokl is on a distinguished road
hey,

maybe trying to set temerature at outlet to inletoutlet instead of zerogradient. But this is just a guess. i dont really have experiences with temperature and compressible domains
Wokl is offline   Reply With Quote

Old   January 21, 2014, 22:44
Default
  #7
New Member
 
Join Date: Sep 2012
Posts: 23
Rep Power: 6
cfdan is on a distinguished road
have you tried sonicLiquidFoam? perhaps change the properties to Air?
cfdan is offline   Reply With Quote

Old   January 22, 2014, 06:09
Default
  #8
New Member
 
erik gustafsson
Join Date: Oct 2013
Posts: 19
Rep Power: 5
guserik is on a distinguished road
i got this error message and it dosent seems to work even if i decrease the time step.

Code:
Courant Number mean: 2.546e-06 max: 2.102
Time = 7.44e-05
PIMPLE: iteration 1
DILUPBiCG:  Solving for Ux, Initial residual = 0.000198399, Final residual = 1.21462e-08, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 1.532e-06, Final residual = 6.61833e-11, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.000142973, Final residual = 1.4482e-08, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 8.24238e-06, Final residual = 6.59127e-10, No Iterations 1
DICPCG:  Solving for p, Initial residual = 1.52383e-06, Final residual = 1.10028e-10, No Iterations 1
DICPCG:  Solving for p, Initial residual = 2.96936e-10, Final residual = 2.96936e-10, No Iterations 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 2.23424e-08, global = 2.2295e-08, cumulative = 5.30414e-06
rho max/min : 16.9458 0.5
DICPCG:  Solving for p, Initial residual = 1.06662e-06, Final residual = 7.77725e-11, No Iterations 1
DICPCG:  Solving for p, Initial residual = 2.05943e-10, Final residual = 2.05943e-10, No Iterations 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 2.23283e-08, global = 2.22954e-08, cumulative = 5.32643e-06
rho max/min : 16.9067 0.5
PIMPLE: iteration 2
DILUPBiCG:  Solving for Ux, Initial residual = 0.000190691, Final residual = 1.19965e-08, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 1.46142e-06, Final residual = 6.30652e-11, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.000138518, Final residual = 1.57799e-08, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 5.76779e-06, Final residual = 5.30602e-10, No Iterations 1
DICPCG:  Solving for p, Initial residual = 1.10255e-06, Final residual = 7.86287e-11, No Iterations 1
DICPCG:  Solving for p, Initial residual = 2.16707e-10, Final residual = 2.16707e-10, No Iterations 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 2.23301e-08, global = 2.22953e-08, cumulative = 5.34873e-06
rho max/min : 16.5248 0.5
DICPCG:  Solving for p, Initial residual = 7.70794e-07, Final residual = 5.57445e-11, No Iterations 1
DICPCG:  Solving for p, Initial residual = 1.4971e-10, Final residual = 1.4971e-10, No Iterations 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 2.23196e-08, global = 2.22956e-08, cumulative = 5.37102e-06
rho max/min : 16.4998 0.5
PIMPLE: not converged within 2 iterations
ExecutionTime = 206.27 s  ClockTime = 206 s
Courant Number mean: 2.55218e-06 max: 2.36776
Time = 7.46e-05
PIMPLE: iteration 1
DILUPBiCG:  Solving for Ux, Initial residual = 0.000194144, Final residual = 1.20409e-08, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 1.5305e-06, Final residual = 6.64108e-11, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.000145038, Final residual = 9.4424e-08, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 8.26599e-06, Final residual = 6.90078e-10, No Iterations 1
DICPCG:  Solving for p, Initial residual = 1.53046e-06, Final residual = 1.10175e-10, No Iterations 1
DICPCG:  Solving for p, Initial residual = 2.97131e-10, Final residual = 2.97131e-10, No Iterations 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 2.09252e-08, global = 2.08779e-08, cumulative = 5.3919e-06
rho max/min : 15.9424 0.5
DICPCG:  Solving for p, Initial residual = 1.07098e-06, Final residual = 7.77815e-11, No Iterations 1
DICPCG:  Solving for p, Initial residual = 2.05442e-10, Final residual = 2.05442e-10, No Iterations 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 2.0911e-08, global = 2.08783e-08, cumulative = 5.41278e-06
rho max/min : 15.9118 0.5
PIMPLE: iteration 2
DILUPBiCG:  Solving for Ux, Initial residual = 0.000187142, Final residual = 1.17762e-08, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 1.46069e-06, Final residual = 6.29492e-11, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.000141385, Final residual = 1.25737e-08, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 5.83935e-06, Final residual = 5.25375e-10, No Iterations 1

[6] #0  Foam::error::printStack(Foam::Ostream&) in "/disk/sw/OpenFOAM/OpenFOAM-2.2.2/platforms/linux64Gcc45DPOpt/lib/libOpenFOAM.so"
[6] #1  Foam::sigFpe::sigHandler(int) in "/disk/sw/OpenFOAM/OpenFOAM-2.2.2/platforms/linux64Gcc45DPOpt/lib/libOpenFOAM.so"
[6] #2  __restore_rt at sigaction.c:0
[6] #3  Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy> > > >::calculate() in "/disk/sw/OpenFOAM/OpenFOAM-2.2.2/platforms/linux64Gcc45DPOpt/lib/libfluidThermophysicalModels.so"
[6] #4  Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy> > > >::correct() in "/disk/sw/OpenFOAM/OpenFOAM-2.2.2/platforms/linux64Gcc45DPOpt/lib/libfluidThermophysicalModels.so"
[6] #5  main in "/disk/sw/OpenFOAM/OpenFOAM-2.2.2/platforms/linux64Gcc45DPOpt/bin/rhoPimpleFoam"
[6] #6  __libc_start_main in "/lib64/libc.so.6"
[6] #7  _start in "/disk/sw/OpenFOAM/OpenFOAM-2.2.2/platforms/linux64Gcc45DPOpt/bin/rhoPimpleFoam"
guserik is offline   Reply With Quote

Old   January 22, 2014, 06:19
Default
  #9
New Member
 
Christian Wokl
Join Date: Mar 2012
Posts: 19
Rep Power: 6
Wokl is on a distinguished road
Hey,

i might be very wrong with this cause i don't know how this solver works. Ur courant number is round 2.

i'd try to change in the controldict: runTimeModifiable yes;
adJustTimeStep on;
maxCo 0.2;
maxDeltaT 1; (won't be used)

christian
Wokl is offline   Reply With Quote

Old   January 22, 2014, 08:10
Default
  #10
New Member
 
erik gustafsson
Join Date: Oct 2013
Posts: 19
Rep Power: 5
guserik is on a distinguished road
Quote:
Originally Posted by Wokl View Post
Hey,

i might be very wrong with this cause i don't know how this solver works. Ur courant number is round 2.

i'd try to change in the controldict: runTimeModifiable yes;
adJustTimeStep on;
maxCo 0.2;
maxDeltaT 1; (won't be used)

christian
Yeah i tried this as well i get the same error message and it seems like my timestep becomes really small. It feel like i tried everything. I include my model with everything except the polymesh since it's confidential. I include a picture on it.

Code:
 

Courant Number mean: 1.35547e-08 max: 0.20109
deltaT = 8.52448e-10
Time = 8.34744e-05
PIMPLE: iteration 1
DILUPBiCG:  Solving for Ux, Initial residual = 5.32808e-07, Final residual = 5.32808e-07, No Iterations 0
DILUPBiCG:  Solving for Uy, Initial residual = 1.46906e-08, Final residual = 1.46906e-08, No Iterations 0
DILUPBiCG:  Solving for Uz, Initial residual = 4.37228e-07, Final residual = 4.37228e-07, No Iterations 0
DILUPBiCG:  Solving for h, Initial residual = 1.40199e-06, Final residual = 5.26987e-15, No Iterations 1
DICPCG:  Solving for p, Initial residual = 4.51225e-08, Final residual = 4.51225e-08, No Iterations 0
DICPCG:  Solving for p, Initial residual = 4.51225e-08, Final residual = 4.51225e-08, No Iterations 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 0.587416, global = -0.587416, cumulative = -3872.89
rho max/min : 6.5 0.5
DICPCG:  Solving for p, Initial residual = 4.51225e-08, Final residual = 4.51225e-08, No Iterations 0
DICPCG:  Solving for p, Initial residual = 4.51225e-08, Final residual = 4.51225e-08, No Iterations 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 0.587416, global = -0.587416, cumulative = -3873.47
rho max/min : 6.5 0.5
PIMPLE: iteration 2
DILUPBiCG:  Solving for Ux, Initial residual = 5.20349e-07, Final residual = 5.20349e-07, No Iterations 0
DILUPBiCG:  Solving for Uy, Initial residual = 1.43596e-08, Final residual = 1.43596e-08, No Iterations 0
DILUPBiCG:  Solving for Uz, Initial residual = 4.33862e-07, Final residual = 4.33862e-07, No Iterations 0
DILUPBiCG:  Solving for h, Initial residual = 1.38729e-06, Final residual = 5.34883e-15, No Iterations 1
DICPCG:  Solving for p, Initial residual = 1.07862e-07, Final residual = 8.70788e-18, No Iterations 1
DICPCG:  Solving for p, Initial residual = 1.11695e-15, Final residual = 1.11695e-15, No Iterations 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 0.587416, global = -0.587416, cumulative = -3874.06
rho max/min : 6.5 0.5
DICPCG:  Solving for p, Initial residual = 7.55031e-08, Final residual = 7.55031e-08, No Iterations 0
DICPCG:  Solving for p, Initial residual = 7.55031e-08, Final residual = 7.55031e-08, No Iterations 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 0.587416, global = -0.587416, cumulative = -3874.65
rho max/min : 6.5 0.5
PIMPLE: not converged within 2 iterations
ExecutionTime = 922.15 s  ClockTime = 922 s
Courant Number mean: 1.34899e-08 max: 0.201615
deltaT = 8.456e-10
Time = 8.34753e-05
PIMPLE: iteration 1
DILUPBiCG:  Solving for Ux, Initial residual = 5.30154e-07, Final residual = 5.30154e-07, No Iterations 0
DILUPBiCG:  Solving for Uy, Initial residual = 1.46871e-08, Final residual = 1.46871e-08, No Iterations 0
DILUPBiCG:  Solving for Uz, Initial residual = 4.36249e-07, Final residual = 4.36249e-07, No Iterations 0
DILUPBiCG:  Solving for h, Initial residual = 1.5e-06, Final residual = 5.53155e-15, No Iterations 1
DICPCG:  Solving for p, Initial residual = 1.43943e-07, Final residual = 8.2891e-18, No Iterations 1
DICPCG:  Solving for p, Initial residual = 1.04359e-15, Final residual = 1.04359e-15, No Iterations 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 0.587416, global = -0.587416, cumulative = -3875.24
rho max/min : 6.5 0.5
DICPCG:  Solving for p, Initial residual = 1.0076e-07, Final residual = 5.80239e-18, No Iterations 1
DICPCG:  Solving for p, Initial residual = 7.82549e-16, Final residual = 7.82549e-16, No Iterations 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 0.587416, global = -0.587416, cumulative = -3875.82
rho max/min : 6.5 0.5
PIMPLE: iteration 2
DILUPBiCG:  Solving for Ux, Initial residual = 5.16925e-07, Final residual = 5.16925e-07, No Iterations 0
DILUPBiCG:  Solving for Uy, Initial residual = 1.41223e-08, Final residual = 1.41223e-08, No Iterations 0
DILUPBiCG:  Solving for Uz, Initial residual = 4.29323e-07, Final residual = 4.29323e-07, No Iterations 0
DILUPBiCG:  Solving for h, Initial residual = 1.49427e-06, Final residual = 4.47344e-15, No Iterations 1
DICPCG:  Solving for p, Initial residual = 5.83863e-07, Final residual = 5.98874e-18, No Iterations 1
DICPCG:  Solving for p, Initial residual = 1.34085e-15, Final residual = 1.34085e-15, No Iterations 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 0.587416, global = -0.587416, cumulative = -3876.41
rho max/min : 6.5 0.5
DICPCG:  Solving for p, Initial residual = 4.08696e-07, Final residual = 4.19205e-18, No Iterations 1
DICPCG:  Solving for p, Initial residual = 9.95919e-16, Final residual = 9.95919e-16, No Iterations 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 0.587416, global = -0.587416, cumulative = -3877
rho max/min : 6.5 0.5
PIMPLE: not converged within 2 iterations
ExecutionTime = 922.7 s  ClockTime = 923 s
Courant Number mean: 1.33887e-08 max: 0.201604
deltaT = 8.3886e-10
Time = 8.34761e-05
PIMPLE: iteration 1
DILUPBiCG:  Solving for Ux, Initial residual = 5.2743e-07, Final residual = 5.2743e-07, No Iterations 0
DILUPBiCG:  Solving for Uy, Initial residual = 1.46825e-08, Final residual = 1.46825e-08, No Iterations 0
DILUPBiCG:  Solving for Uz, Initial residual = 4.35096e-07, Final residual = 4.35096e-07, No Iterations 0
DILUPBiCG:  Solving for h, Initial residual = 1.65116e-06, Final residual = 6.32685e-15, No Iterations 1

 
[6] #0  Foam::error::printStack(Foam::Ostream&) in "/disk/sw/OpenFOAM/OpenFOAM-2.2.2/platforms/linux64Gcc45DPOpt/lib/libOpenFOAM.so"
[6] #1  Foam::sigFpe::sigHandler(int) in "/disk/sw/OpenFOAM/OpenFOAM-2.2.2/platforms/linux64Gcc45DPOpt/lib/libOpenFOAM.so"
[6] #2  __restore_rt at sigaction.c:0
[6] #3  Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy> > > >::calculate() in "/disk/sw/OpenFOAM/OpenFOAM-2.2.2/platforms/linux64Gcc45DPOpt/lib/libfluidThermophysicalModels.so"
[6] #4  Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy> > > >::correct() in "/disk/sw/OpenFOAM/OpenFOAM-2.2.2/platforms/linux64Gcc45DPOpt/lib/libfluidThermophysicalModels.so"
[6] #5  main in "/disk/sw/OpenFOAM/OpenFOAM-2.2.2/platforms/linux64Gcc45DPOpt/bin/rhoPimpleFoam"
[6] #6  __libc_start_main in "/lib64/libc.so.6"
[6] #7  _start in "/disk/sw/OpenFOAM/OpenFOAM-2.2.2/platforms/linux64Gcc45DPOpt/bin/rhoPimpleFoam"
Attached Files
File Type: zip model.zip (14.6 KB, 3 views)
guserik is offline   Reply With Quote

Old   January 22, 2014, 08:42
Default
  #11
New Member
 
Christian Wokl
Join Date: Mar 2012
Posts: 19
Rep Power: 6
Wokl is on a distinguished road
hey

in this log your time step conituity error looks suspicious.
Can't help there, but maybe u can find something in this forum

in ur T.org file you specify 2 types of boundary conditions for the outlet. i dont know if openfoam just takes the first one or the second one.

since i cant see the model: are you setting the fields for all the domain or a part within the domain? if its the whole domain u could also set the values for internal field.

another guess: setting the boundary U outlet to pressureInletOutletVelocity. should basically do the same.

you could also try to set nOuterCorrectors for the pimple solver in the fvSolution file to 4. maybe it then converges.

did you copy the sytem folder from a tutorial? There are many div schemes listed for variables u dont calculate. But i guess this doenst matter.
Wokl is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tank emptying Andrea1984 OpenFOAM 10 April 7, 2013 05:56
Emptying of a tank using VOF modelling cric92 FLUENT 3 December 26, 2012 09:23
Surge tank emptying using InterFAOM- Stops when surface reaches outlet Ramnik OpenFOAM Running, Solving & CFD 0 May 26, 2010 10:42
How can i simulate a emptying bi-phasic tank? Ruggero FLUENT 1 July 9, 2007 02:17
Emptying of a tank Mario CFX 2 September 29, 2006 10:51


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