
[Sponsors] 
January 4, 2014, 08:17 
Emptying of a tank

#1 
New Member
erik gustafsson
Join Date: Oct 2013
Posts: 19
Rep Power: 5 
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! 

January 20, 2014, 04:08 

#2 
New Member
Christian Wokl
Join Date: Mar 2012
Posts: 19
Rep Power: 6 
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 

January 20, 2014, 04:45 

#3  
New Member
erik gustafsson
Join Date: Oct 2013
Posts: 19
Rep Power: 5 
Quote:
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. 

January 20, 2014, 05:14 

#4 
New Member
Christian Wokl
Join Date: Mar 2012
Posts: 19
Rep Power: 6 
have u already tried running the simulation? Any errors occured?


January 20, 2014, 06:06 

#5 
New Member
erik gustafsson
Join Date: Oct 2013
Posts: 19
Rep Power: 5 
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/OpenFOAM2.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 =) 

January 20, 2014, 06:53 

#6 
New Member
Christian Wokl
Join Date: Mar 2012
Posts: 19
Rep Power: 6 
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 

January 21, 2014, 22:44 

#7 
New Member
Join Date: Sep 2012
Posts: 23
Rep Power: 6 
have you tried sonicLiquidFoam? perhaps change the properties to Air?


January 22, 2014, 06:09 

#8 
New Member
erik gustafsson
Join Date: Oct 2013
Posts: 19
Rep Power: 5 
i got this error message and it dosent seems to work even if i decrease the time step.
Code:
Courant Number mean: 2.546e06 max: 2.102 Time = 7.44e05 PIMPLE: iteration 1 DILUPBiCG: Solving for Ux, Initial residual = 0.000198399, Final residual = 1.21462e08, No Iterations 1 DILUPBiCG: Solving for Uy, Initial residual = 1.532e06, Final residual = 6.61833e11, No Iterations 1 DILUPBiCG: Solving for Uz, Initial residual = 0.000142973, Final residual = 1.4482e08, No Iterations 1 DILUPBiCG: Solving for h, Initial residual = 8.24238e06, Final residual = 6.59127e10, No Iterations 1 DICPCG: Solving for p, Initial residual = 1.52383e06, Final residual = 1.10028e10, No Iterations 1 DICPCG: Solving for p, Initial residual = 2.96936e10, Final residual = 2.96936e10, No Iterations 0 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 2.23424e08, global = 2.2295e08, cumulative = 5.30414e06 rho max/min : 16.9458 0.5 DICPCG: Solving for p, Initial residual = 1.06662e06, Final residual = 7.77725e11, No Iterations 1 DICPCG: Solving for p, Initial residual = 2.05943e10, Final residual = 2.05943e10, No Iterations 0 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 2.23283e08, global = 2.22954e08, cumulative = 5.32643e06 rho max/min : 16.9067 0.5 PIMPLE: iteration 2 DILUPBiCG: Solving for Ux, Initial residual = 0.000190691, Final residual = 1.19965e08, No Iterations 1 DILUPBiCG: Solving for Uy, Initial residual = 1.46142e06, Final residual = 6.30652e11, No Iterations 1 DILUPBiCG: Solving for Uz, Initial residual = 0.000138518, Final residual = 1.57799e08, No Iterations 1 DILUPBiCG: Solving for h, Initial residual = 5.76779e06, Final residual = 5.30602e10, No Iterations 1 DICPCG: Solving for p, Initial residual = 1.10255e06, Final residual = 7.86287e11, No Iterations 1 DICPCG: Solving for p, Initial residual = 2.16707e10, Final residual = 2.16707e10, No Iterations 0 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 2.23301e08, global = 2.22953e08, cumulative = 5.34873e06 rho max/min : 16.5248 0.5 DICPCG: Solving for p, Initial residual = 7.70794e07, Final residual = 5.57445e11, No Iterations 1 DICPCG: Solving for p, Initial residual = 1.4971e10, Final residual = 1.4971e10, No Iterations 0 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 2.23196e08, global = 2.22956e08, cumulative = 5.37102e06 rho max/min : 16.4998 0.5 PIMPLE: not converged within 2 iterations ExecutionTime = 206.27 s ClockTime = 206 s Courant Number mean: 2.55218e06 max: 2.36776 Time = 7.46e05 PIMPLE: iteration 1 DILUPBiCG: Solving for Ux, Initial residual = 0.000194144, Final residual = 1.20409e08, No Iterations 1 DILUPBiCG: Solving for Uy, Initial residual = 1.5305e06, Final residual = 6.64108e11, No Iterations 1 DILUPBiCG: Solving for Uz, Initial residual = 0.000145038, Final residual = 9.4424e08, No Iterations 1 DILUPBiCG: Solving for h, Initial residual = 8.26599e06, Final residual = 6.90078e10, No Iterations 1 DICPCG: Solving for p, Initial residual = 1.53046e06, Final residual = 1.10175e10, No Iterations 1 DICPCG: Solving for p, Initial residual = 2.97131e10, Final residual = 2.97131e10, No Iterations 0 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 2.09252e08, global = 2.08779e08, cumulative = 5.3919e06 rho max/min : 15.9424 0.5 DICPCG: Solving for p, Initial residual = 1.07098e06, Final residual = 7.77815e11, No Iterations 1 DICPCG: Solving for p, Initial residual = 2.05442e10, Final residual = 2.05442e10, No Iterations 0 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 2.0911e08, global = 2.08783e08, cumulative = 5.41278e06 rho max/min : 15.9118 0.5 PIMPLE: iteration 2 DILUPBiCG: Solving for Ux, Initial residual = 0.000187142, Final residual = 1.17762e08, No Iterations 1 DILUPBiCG: Solving for Uy, Initial residual = 1.46069e06, Final residual = 6.29492e11, No Iterations 1 DILUPBiCG: Solving for Uz, Initial residual = 0.000141385, Final residual = 1.25737e08, No Iterations 1 DILUPBiCG: Solving for h, Initial residual = 5.83935e06, Final residual = 5.25375e10, No Iterations 1 [6] #0 Foam::error::printStack(Foam::Ostream&) in "/disk/sw/OpenFOAM/OpenFOAM2.2.2/platforms/linux64Gcc45DPOpt/lib/libOpenFOAM.so" [6] #1 Foam::sigFpe::sigHandler(int) in "/disk/sw/OpenFOAM/OpenFOAM2.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/OpenFOAM2.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/OpenFOAM2.2.2/platforms/linux64Gcc45DPOpt/lib/libfluidThermophysicalModels.so" [6] #5 main in "/disk/sw/OpenFOAM/OpenFOAM2.2.2/platforms/linux64Gcc45DPOpt/bin/rhoPimpleFoam" [6] #6 __libc_start_main in "/lib64/libc.so.6" [6] #7 _start in "/disk/sw/OpenFOAM/OpenFOAM2.2.2/platforms/linux64Gcc45DPOpt/bin/rhoPimpleFoam" 

January 22, 2014, 06:19 

#9 
New Member
Christian Wokl
Join Date: Mar 2012
Posts: 19
Rep Power: 6 
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 

January 22, 2014, 08:10 

#10  
New Member
erik gustafsson
Join Date: Oct 2013
Posts: 19
Rep Power: 5 
Quote:
Code:
Courant Number mean: 1.35547e08 max: 0.20109 deltaT = 8.52448e10 Time = 8.34744e05 PIMPLE: iteration 1 DILUPBiCG: Solving for Ux, Initial residual = 5.32808e07, Final residual = 5.32808e07, No Iterations 0 DILUPBiCG: Solving for Uy, Initial residual = 1.46906e08, Final residual = 1.46906e08, No Iterations 0 DILUPBiCG: Solving for Uz, Initial residual = 4.37228e07, Final residual = 4.37228e07, No Iterations 0 DILUPBiCG: Solving for h, Initial residual = 1.40199e06, Final residual = 5.26987e15, No Iterations 1 DICPCG: Solving for p, Initial residual = 4.51225e08, Final residual = 4.51225e08, No Iterations 0 DICPCG: Solving for p, Initial residual = 4.51225e08, Final residual = 4.51225e08, 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.51225e08, Final residual = 4.51225e08, No Iterations 0 DICPCG: Solving for p, Initial residual = 4.51225e08, Final residual = 4.51225e08, 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.20349e07, Final residual = 5.20349e07, No Iterations 0 DILUPBiCG: Solving for Uy, Initial residual = 1.43596e08, Final residual = 1.43596e08, No Iterations 0 DILUPBiCG: Solving for Uz, Initial residual = 4.33862e07, Final residual = 4.33862e07, No Iterations 0 DILUPBiCG: Solving for h, Initial residual = 1.38729e06, Final residual = 5.34883e15, No Iterations 1 DICPCG: Solving for p, Initial residual = 1.07862e07, Final residual = 8.70788e18, No Iterations 1 DICPCG: Solving for p, Initial residual = 1.11695e15, Final residual = 1.11695e15, 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.55031e08, Final residual = 7.55031e08, No Iterations 0 DICPCG: Solving for p, Initial residual = 7.55031e08, Final residual = 7.55031e08, 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.34899e08 max: 0.201615 deltaT = 8.456e10 Time = 8.34753e05 PIMPLE: iteration 1 DILUPBiCG: Solving for Ux, Initial residual = 5.30154e07, Final residual = 5.30154e07, No Iterations 0 DILUPBiCG: Solving for Uy, Initial residual = 1.46871e08, Final residual = 1.46871e08, No Iterations 0 DILUPBiCG: Solving for Uz, Initial residual = 4.36249e07, Final residual = 4.36249e07, No Iterations 0 DILUPBiCG: Solving for h, Initial residual = 1.5e06, Final residual = 5.53155e15, No Iterations 1 DICPCG: Solving for p, Initial residual = 1.43943e07, Final residual = 8.2891e18, No Iterations 1 DICPCG: Solving for p, Initial residual = 1.04359e15, Final residual = 1.04359e15, 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.0076e07, Final residual = 5.80239e18, No Iterations 1 DICPCG: Solving for p, Initial residual = 7.82549e16, Final residual = 7.82549e16, 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.16925e07, Final residual = 5.16925e07, No Iterations 0 DILUPBiCG: Solving for Uy, Initial residual = 1.41223e08, Final residual = 1.41223e08, No Iterations 0 DILUPBiCG: Solving for Uz, Initial residual = 4.29323e07, Final residual = 4.29323e07, No Iterations 0 DILUPBiCG: Solving for h, Initial residual = 1.49427e06, Final residual = 4.47344e15, No Iterations 1 DICPCG: Solving for p, Initial residual = 5.83863e07, Final residual = 5.98874e18, No Iterations 1 DICPCG: Solving for p, Initial residual = 1.34085e15, Final residual = 1.34085e15, 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.08696e07, Final residual = 4.19205e18, No Iterations 1 DICPCG: Solving for p, Initial residual = 9.95919e16, Final residual = 9.95919e16, 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.33887e08 max: 0.201604 deltaT = 8.3886e10 Time = 8.34761e05 PIMPLE: iteration 1 DILUPBiCG: Solving for Ux, Initial residual = 5.2743e07, Final residual = 5.2743e07, No Iterations 0 DILUPBiCG: Solving for Uy, Initial residual = 1.46825e08, Final residual = 1.46825e08, No Iterations 0 DILUPBiCG: Solving for Uz, Initial residual = 4.35096e07, Final residual = 4.35096e07, No Iterations 0 DILUPBiCG: Solving for h, Initial residual = 1.65116e06, Final residual = 6.32685e15, No Iterations 1 [6] #0 Foam::error::printStack(Foam::Ostream&) in "/disk/sw/OpenFOAM/OpenFOAM2.2.2/platforms/linux64Gcc45DPOpt/lib/libOpenFOAM.so" [6] #1 Foam::sigFpe::sigHandler(int) in "/disk/sw/OpenFOAM/OpenFOAM2.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/OpenFOAM2.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/OpenFOAM2.2.2/platforms/linux64Gcc45DPOpt/lib/libfluidThermophysicalModels.so" [6] #5 main in "/disk/sw/OpenFOAM/OpenFOAM2.2.2/platforms/linux64Gcc45DPOpt/bin/rhoPimpleFoam" [6] #6 __libc_start_main in "/lib64/libc.so.6" [6] #7 _start in "/disk/sw/OpenFOAM/OpenFOAM2.2.2/platforms/linux64Gcc45DPOpt/bin/rhoPimpleFoam" 

January 22, 2014, 08:42 

#11 
New Member
Christian Wokl
Join Date: Mar 2012
Posts: 19
Rep Power: 6 
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. 

Thread Tools  
Display Modes  


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 biphasic tank?  Ruggero  FLUENT  1  July 9, 2007 02:17 
Emptying of a tank  Mario  CFX  2  September 29, 2006 10:51 