
[Sponsors] 
January 22, 2009, 12:52 
Dear Foamers
The funct

#1 
Senior Member

Dear 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 

January 23, 2009, 02:53 
src/lagrangian/dieselSpray/par

#2 
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 21 
src/lagrangian/dieselSpray/parcel/parcel.C
try cd dieselSpray grep sms lnInclude/* 

January 23, 2009, 16:59 
Hi Niklas
It is great h

#3 
Senior Member

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

April 29, 2009, 02:59 

#4 
Member
Michael
Join Date: Mar 2009
Posts: 48
Rep Power: 9 
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 

May 4, 2009, 04:23 

#5 
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 21 
1. Move droplets through the domain using the gasproperties available at the current timestep.
As we move the drops, we calculate the source terms for the cells. The flowfield is frozen during the evaporation and drops will see the effect of previous drops in terms of fuelvapour concentration and temperaturechange. 2. Update the Eulerian phase using the spray source terms. 

May 6, 2009, 08:33 

#6  
Member
Nugroho Adi
Join Date: Mar 2009
Location: norway
Posts: 79
Rep Power: 9 
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.72574e08, No Iterations 3 DILUPBiCG: Solving for Uy, Initial residual = 0.101288, Final residual = 2.68577e08, No Iterations 3 DILUPBiCG: Solving for Uz, Initial residual = 0.0843472, Final residual = 2.75473e08, No Iterations 3 DILUPBiCG: Solving for O2, Initial residual = 9.0223e05, Final residual = 2.58132e10, No Iterations 1 DILUPBiCG: Solving for H2O, Initial residual = 9.02231e05, Final residual = 2.66279e10, No Iterations 1 DILUPBiCG: Solving for NH3, Initial residual = 0, Final residual = 0, No Iterations 0 DILUPBiCG: Solving for CO2, Initial residual = 9.02231e05, Final residual = 2.66279e10, 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.65412e08, No Iterations 2 GAMGPCG: Solving for p, Initial residual = 0.108633, Final residual = 1.56513e13, No Iterations 2 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 1.23021e14, global = 1.34035e16, cumulative = 5.24391e12 GAMGPCG: Solving for p, Initial residual = 0.0186112, Final residual = 8.99353e15, No Iterations 2 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 8.91415e16, global = 1.2269e16, cumulative = 5.24403e12 DILUPBiCG: Solving for epsilon, Initial residual = 0.0712864, Final residual = 1.56032e10, No Iterations 1 DILUPBiCG: Solving for k, Initial residual = 0.0367391, Final residual = 5.41607e11, 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.581250e01 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.88142e07, No Iterations 2 DILUPBiCG: Solving for Uy, Initial residual = 0.114549, Final residual = 3.29772e08, No Iterations 2 DILUPBiCG: Solving for Uz, Initial residual = 0.0913685, Final residual = 1.06553e07, No Iterations 2 DILUPBiCG: Solving for O2, Initial residual = 8.98979e05, Final residual = 2.57023e10, No Iterations 1 DILUPBiCG: Solving for H2O, Initial residual = 8.9898e05, Final residual = 2.65299e10, No Iterations 1 DILUPBiCG: Solving for NH3, Initial residual = 0, Final residual = 0, No Iterations 0 DILUPBiCG: Solving for CO2, Initial residual = 8.9898e05, Final residual = 2.65299e10, 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.84713e10, No Iterations 2 attempt to use janafThermo<equationOfState> out of temperature range 200 > 5000; T = 191.755#0 Foam::error:rintStack(Foam::Ostream&) in "/home/user/OpenFOAM/OpenFOAM1.5/lib/linuxGccDPOpt/libOpenFOAM.so" #1 Foam::error::abort() in "/home/user/OpenFOAM/OpenFOAM1.5/lib/linuxGccDPOpt/libOpenFOAM.so" #2 Foam::specieThermo<Foam::janafThermo<Foam:erfect Gas> >::H(double) const in "/home/user/OpenFOAM/OpenFOAM1.5/lib/linuxGccDPOpt/libcombustionThermophysicalModels.so" #3 Foam::hMixtureThermo<Foam::reactingMixture>::calcu late() in "/home/user/OpenFOAM/OpenFOAM1.5/lib/linuxGccDPOpt/libcombustionThermophysicalModels.so" #4 Foam::hMixtureThermo<Foam::reactingMixture>::corre ct() in "/home/user/OpenFOAM/OpenFOAM1.5/lib/linuxGccDPOpt/libcombustionThermophysicalModels.so" #5 main in "/home/user/OpenFOAM/OpenFOAM1.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/OpenFOAM1.5/applications/bin/linuxGccDPOpt/dieselFoam" From function janafThermo<equationOfState>::checkT(const scalar T) const in file /home/dm2/henry/OpenFOAM/OpenFOAM1.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 

May 10, 2009, 07:38 
temperature T is out of range

#7 
Senior Member

Hi 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 

May 10, 2009, 07:48 

#8  
Member
Nugroho Adi
Join Date: Mar 2009
Location: norway
Posts: 79
Rep Power: 9 
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 

May 10, 2009, 07:54 

#9 
Senior Member

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 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
UDF: Source terms  Novice  FLUENT  0  January 13, 2009 05:17 
Source Terms  Sas  Main CFD Forum  5  November 24, 2006 04:40 
UDF  source terms  Fred  FLUENT  2  October 11, 2005 20:53 
Source Terms  Rajan  CFX  1  March 14, 2005 10:26 
Is it possible to use source terms for .....????  Sharad Dugad  FLUENT  0  June 7, 2002 14:19 