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

Problems with Spray Source Terms

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

Reply
 
LinkBack Thread Tools Display Modes
Old   January 22, 2009, 12:52
Default Dear Foamers The funct
  #1
Senior Member
 
su_junwei's Avatar
 
su junwei
Join Date: Mar 2009
Location: Xi'an China
Posts: 151
Rep Power: 10
su_junwei is on a distinguished road
Send a message via MSN to su_junwei
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
su_junwei is offline   Reply With Quote

Old   January 23, 2009, 02:53
Default src/lagrangian/dieselSpray/par
  #2
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 20
niklas will become famous soon enoughniklas will become famous soon enough
src/lagrangian/dieselSpray/parcel/parcel.C

try
cd dieselSpray
grep sms lnInclude/*
niklas is offline   Reply With Quote

Old   January 23, 2009, 16:59
Default Hi Niklas It is great h
  #3
Senior Member
 
su_junwei's Avatar
 
su junwei
Join Date: Mar 2009
Location: Xi'an China
Posts: 151
Rep Power: 10
su_junwei is on a distinguished road
Send a message via MSN to su_junwei
Hi Niklas

It is great help to me. Thank you very much .

Junwei
su_junwei is offline   Reply With Quote

Old   April 29, 2009, 02:59
Default
  #4
Member
 
Michael
Join Date: Mar 2009
Posts: 48
Rep Power: 8
farbfilm is on a distinguished road
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
farbfilm is offline   Reply With Quote

Old   May 4, 2009, 04:23
Default
  #5
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 20
niklas will become famous soon enoughniklas will become famous soon enough
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.
niklas is offline   Reply With Quote

Old   May 6, 2009, 08:33
Default
  #6
Member
 
Nugroho Adi
Join Date: Mar 2009
Location: norway
Posts: 79
Rep Power: 8
mahaputra is on a distinguished road
Quote:
Originally Posted by niklas View Post
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.
Dear Niklas,

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:rintStack(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:erfect 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
mahaputra is offline   Reply With Quote

Old   May 10, 2009, 07:38
Default temperature T is out of range
  #7
Senior Member
 
su_junwei's Avatar
 
su junwei
Join Date: Mar 2009
Location: Xi'an China
Posts: 151
Rep Power: 10
su_junwei is on a distinguished road
Send a message via MSN to su_junwei
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
su_junwei is offline   Reply With Quote

Old   May 10, 2009, 07:48
Default
  #8
Member
 
Nugroho Adi
Join Date: Mar 2009
Location: norway
Posts: 79
Rep Power: 8
mahaputra is on a distinguished road
Quote:
Originally Posted by su_junwei View Post
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
Dear Junwei

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
mahaputra is offline   Reply With Quote

Old   May 10, 2009, 07:54
Default
  #9
Senior Member
 
su_junwei's Avatar
 
su junwei
Join Date: Mar 2009
Location: Xi'an China
Posts: 151
Rep Power: 10
su_junwei is on a distinguished road
Send a message via MSN to su_junwei
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
su_junwei 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
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


All times are GMT -4. The time now is 04:56.