- **OpenFOAM Running, Solving & CFD**
(*http://www.cfd-online.com/Forums/openfoam-solving/*)

- - **Problems with Spray Source Terms**
(*http://www.cfd-online.com/Forums/openfoam-solving/58059-problems-spray-source-terms.html*)

Dear Foamers
The functDear Foamers
The functions below inline tmp<volvectorfield> momentumSource() const; inline tmp<volscalarfield> evaporationSource(const label i) const; inline tmp<volscalarfield> heatTransferSource() const; in the class of spray are used when coupling the spray lagrangian particle models with Euler continuous fields, aren't they ? But I noticed that in the definition of these functions, they just returned the value of corresponding private variables for instance in momentumSource inline tmp<volvectorfield> spray::momentumSource() const { tmp<volvectorfield> tsource ( new volVectorField ( IOobject ( "sms", runTime_.timeName(), mesh_, IOobject::NO_READ, IOobject::NO_WRITE ), mesh_, dimensionedVector ( "zero", dimensionSet(1, -2, -2, 0, 0), vector::zero ) ) ); tsource().internalField() = sms_/runTime_.deltaT().value()/mesh_.V(); return tsource; } In theory, there should be some functions for updating these private members(sms_ for instance), but I search all the code doc of Spray class and found nothing. Where are they? Junwei |

src/lagrangian/dieselSpray/parsrc/lagrangian/dieselSpray/parcel/parcel.C
try cd dieselSpray grep sms lnInclude/* |

Hi Niklas
It is great hHi Niklas
It is great help to me. Thank you very much . Junwei |

Hi,
I'm trying to figure out how the coupling between the two phase is working! So, I searched the code and get the following idea how it works: step 1: Solving the equations for the gas phase (Euler) step 2: Solving the equations for the particles, which is influenced by step 1 step 3: Calculate the spray source terms.Now it starts again with step 1. The source terms now influence the equations for the gas phase. Unfortunately, I'm not very experienced in reading a C++ code, so I'm not sure if the described procedure is right... Can somebody tell me if I'm right?? Thanks, Michael |

1. Move droplets through the domain using the gas-properties available at the current timestep.
As we move the drops, we calculate the source terms for the cells. The flow-field is frozen during the evaporation and drops will see the effect of previous drops in terms of fuel-vapour concentration and temperature-change. 2. Update the Eulerian phase using the spray source terms. |

Quote:
i dont know, my question is out of topic or not, by the way, i modified you sample case ammo (Ammonia) http://files.nequam.se/ammo.tgz i change on the inlet not NH3, but, CO2 + H2O(steam) (no combustion problem) on my inlet i want to see the behaviour of these gases inside of my condenser, i put 1 cooling tube with a fixed temperature in this condenser, and i modify the outlet becomes 2 (on the top and bottom). but i got this following error when i run it : Evolving Spray Solving chemistry diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 DILUPBiCG: Solving for Ux, Initial residual = 0.23957, Final residual = 5.72574e-08, No Iterations 3 DILUPBiCG: Solving for Uy, Initial residual = 0.101288, Final residual = 2.68577e-08, No Iterations 3 DILUPBiCG: Solving for Uz, Initial residual = 0.0843472, Final residual = 2.75473e-08, No Iterations 3 DILUPBiCG: Solving for O2, Initial residual = 9.0223e-05, Final residual = 2.58132e-10, No Iterations 1 DILUPBiCG: Solving for H2O, Initial residual = 9.02231e-05, Final residual = 2.66279e-10, No Iterations 1 DILUPBiCG: Solving for NH3, Initial residual = 0, Final residual = 0, No Iterations 0 DILUPBiCG: Solving for CO2, Initial residual = 9.02231e-05, Final residual = 2.66279e-10, No Iterations 1 DILUPBiCG: Solving for C7H16, Initial residual = 0, Final residual = 0, No Iterations 0 DILUPBiCG: Solving for h, Initial residual = 0.0402887, Final residual = 1.65412e-08, No Iterations 2 GAMGPCG: Solving for p, Initial residual = 0.108633, Final residual = 1.56513e-13, No Iterations 2 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 1.23021e-14, global = 1.34035e-16, cumulative = 5.24391e-12 GAMGPCG: Solving for p, Initial residual = 0.0186112, Final residual = 8.99353e-15, No Iterations 2 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 8.91415e-16, global = 1.2269e-16, cumulative = 5.24403e-12 DILUPBiCG: Solving for epsilon, Initial residual = 0.0712864, Final residual = 1.56032e-10, No Iterations 1 DILUPBiCG: Solving for k, Initial residual = 0.0367391, Final residual = 5.41607e-11, No Iterations 2 Number of parcels in system | 0 Injected liquid mass....... | 0 mg Liquid Mass in system...... | 0 mg SMD, Dmax.................. | 0 mu, 0 mu Added gas mass = -314665 mg Evaporation Continuity Error| -314665 mg ExecutionTime = 6.46 s ClockTime = 6 s Courant Number mean: 0.0018405 max: 0.1765 deltaT = 0.000625 Time = 1.581250e-01 Evolving Spray Solving chemistry diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 DILUPBiCG: Solving for Ux, Initial residual = 0.490188, Final residual = 7.88142e-07, No Iterations 2 DILUPBiCG: Solving for Uy, Initial residual = 0.114549, Final residual = 3.29772e-08, No Iterations 2 DILUPBiCG: Solving for Uz, Initial residual = 0.0913685, Final residual = 1.06553e-07, No Iterations 2 DILUPBiCG: Solving for O2, Initial residual = 8.98979e-05, Final residual = 2.57023e-10, No Iterations 1 DILUPBiCG: Solving for H2O, Initial residual = 8.9898e-05, Final residual = 2.65299e-10, No Iterations 1 DILUPBiCG: Solving for NH3, Initial residual = 0, Final residual = 0, No Iterations 0 DILUPBiCG: Solving for CO2, Initial residual = 8.9898e-05, Final residual = 2.65299e-10, No Iterations 1 DILUPBiCG: Solving for C7H16, Initial residual = 0, Final residual = 0, No Iterations 0 DILUPBiCG: Solving for h, Initial residual = 0.0168068, Final residual = 3.84713e-10, No Iterations 2 attempt to use janafThermo<equationOfState> out of temperature range 200 -> 5000; T = 191.755#0 Foam::error::printStack(Foam::Ostream&) in "/home/user/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so" #1 Foam::error::abort() in "/home/user/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so" #2 Foam::specieThermo<Foam::janafThermo<Foam::perfect Gas> >::H(double) const in "/home/user/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libcombustionThermophysicalModels.so" #3 Foam::hMixtureThermo<Foam::reactingMixture>::calcu late() in "/home/user/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libcombustionThermophysicalModels.so" #4 Foam::hMixtureThermo<Foam::reactingMixture>::corre ct() in "/home/user/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libcombustionThermophysicalModels.so" #5 main in "/home/user/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/dieselFoam" #6 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6" #7 Foam::regIOobject::writeObject(Foam::IOstream::str eamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const in "/home/user/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/dieselFoam" From function janafThermo<equationOfState>::checkT(const scalar T) const in file /home/dm2/henry/OpenFOAM/OpenFOAM-1.5/src/thermophysicalModels/specie/lnInclude/janafThermoI.H at line 70. FOAM aborting it seems that no parcel and injection to the system ??? do you know why this happen? please, i really need help Tack MVH Nugroho Adi |

temperature T is out of rangeHi Nugroho Adi
It seems that you got a value of 191.755 for temperature Which is out of the temperatue range for the state equation. If the temperature is reasonable in physics, you have to extend the state equation to a wider range for temperature, or bound the temperature please using the following code. T.max("small", T.dimensions(), 200); T.min("large",T.dimensions(),5000); //for the upper range. Junwei |

Quote:
thanks for your comment by the way, where i have to put these code ? T.max("small", T.dimensions(), 200); T.min("large",T.dimensions(),5000); //for the upper range. ? thanks |

Hi Nugroho
I don't konw the concrete codes, I don't konw where is the best. Is there a equation for temperature? Insert the codes after the solving the temperature equation or before the you use the state equation Junwei |

All times are GMT -4. The time now is 21:25. |