CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

[Lagrangian] Injection Model Start of Injection timestep Mistake?

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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 27, 2014, 04:37
Default [Lagrangian] Injection Model Start of Injection timestep Mistake?
  #1
New Member
 
Emeline Noel
Join Date: Dec 2013
Location: Paris
Posts: 13
Rep Power: 3
zarox is on a distinguished road
Hi everyone,

[OF 2.2.2]
Looking at the lagrangian injection Model : InjectionModel.C,
I find in the membre function PrepareForTheNextTimestep something I don't Understand :

// Make times relative to SOI
scalar t0 = timeStep0_ - SOI_;
scalar t1 = time - SOI_;

In my mind, because timestep0_ is the last time step, so the first delta Time between current time and SOI is miss, indeed function parcelsToinject require t0 > 0

so in my mind,

if SOI = 0.5

at first step time =1 (dt=1) timeStep_0=0
so t0=-0.5 so no parcel to inject ... [But we want to inject parcel, no?]

at second step time time =2 timestep_0 = 1
so t0 = 0.5 and t1 = 1.5 so inject parcel give us t1-t0 = dt =1

But we have forget the first par of injection from SOI = 0.5 to time =1


Is it right? Where is my missunderstanding?


If someone can enlighten me, it will be great!



Have a nice day!
zarox is offline   Reply With Quote

Old   October 29, 2014, 17:51
Default
  #2
New Member
 
Chris Sears
Join Date: Oct 2014
Location: Boston
Posts: 4
Rep Power: 2
ChristoBeers is on a distinguished road
Has anybody looked into this? InjectionModel seems good, but the derived injection model's parcelsToInject disallows time0<0 as you noted Emeline.

e.g. I am using coneNozzleInjection with SOI = 10.010. See log file, the first injection time step 10.0101 is missed...!? May be a bug? (albeit minor I suppose!)


Quote:
Courant Number mean: 0.1118990122 max: 1.994706046
deltaT = 0.0003471966024
Time = 10.0101


Solving 3-D cloud reactingCloud1
Cloud: reactingCloud1
Current number of parcels = 0
Current mass in system = 0
Linear momentum = (0 0 0)
|Linear momentum| = 0
Linear kinetic energy = 0
model1:
number of parcels added = 0
mass introduced = 0
Parcels absorbed into film = 0
New film detached parcels = 0
Parcel fate (number, mass)
- escape = 0, 0
- stick = 0, 0
Temperature min/max = 0, 0
Mass transfer phase change = 0
Mass transfer devolatilisation = 0
Mass transfer surface reaction = 0

diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
rho min/max = 1.113112118, 1.171788043
DILUPBiCG: Solving for Ux, Initial residual = 3.337508174e-006, Final residual = 7.54026209e-008, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 5.504945546e-005, Final residual = 6.941799875e-007, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 2.989294024e-005, Final residual = 1.62292623e-007, No Iterations 2
smoothSolver: Solving for C2H5OH, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for h, Initial residual = 6.731643474e-005, Final residual = 8.670916541e-007, No Iterations 1
T gas min/max = 329.6221401, 330.0232519
GAMG: Solving for p, Initial residual = 2.82501963e-005, Final residual = 8.700497101e-006, No Iterations 1
GAMG: Solving for p, Initial residual = 8.700456195e-006, Final residual = 8.700456195e-006, No Iterations 0
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
rho min/max = 1.113112293, 1.171788119
time step continuity errors : sum local = 2.836225714e-007, global = -6.787536111e-009, cumulative = -5.346327795e-007
p min/max = 108937, 114760.7215
GAMG: Solving for p, Initial residual = 9.265208855e-006, Final residual = 9.265208855e-006, No Iterations 0
GAMG: Solving for p, Initial residual = 9.265208855e-006, Final residual = 9.265208855e-006, No Iterations 0
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
rho min/max = 1.113112293, 1.171788256
time step continuity errors : sum local = 3.02032656e-007, global = -6.781834716e-009, cumulative = -5.414146142e-007
p min/max = 108937, 114760.7215
smoothSolver: Solving for epsilon, Initial residual = 9.471710755e-006, Final residual = 9.471710755e-006, No Iterations 0
smoothSolver: Solving for k, Initial residual = 3.536078672e-005, Final residual = 1.691882988e-006, No Iterations 1
ExecutionTime = 19.562 s ClockTime = 20 s

Courant Number mean: 0.11189953 max: 1.994730392
deltaT = 0.0003471966024
Time = 10.0104


Solving 3-D cloud reactingCloud1

--> Cloud: reactingCloud1 injector: model1
Added 34 new parcels

Cloud: reactingCloud1
Current number of parcels = 34
Current mass in system = 1.190824736e-007
Linear momentum = (-4.40729446e-010 3.633447476e-011 -1.927799815e-008)
|Linear momentum| = 1.928306965e-008
Linear kinetic energy = 1.593230117e-009
model1:
number of parcels added = 34
mass introduced = 1.202654311e-007
Parcels absorbed into film = 0
New film detached parcels = 0
Parcel fate (number, mass)
- escape = 0, 0
- stick = 0, 0
Temperature min/max = 295.1830963, 365.007777
Mass transfer phase change = 1.182957479e-009
Mass transfer devolatilisation = 0
Mass transfer surface reaction = 0
ChristoBeers is offline   Reply With Quote

Old   November 5, 2014, 21:53
Default
  #3
Senior Member
 
kmooney's Avatar
 
Kyle Mooney
Join Date: Jul 2009
Location: Amherst, MA USA - San Diego, CA USA
Posts: 278
Rep Power: 9
kmooney is on a distinguished road
The answer to your question should lie in the call to parcelsToInject function in one of the InjectionModel derived classes as opposed to looking at the base class.

For example, take a look at the PatchFlowRateInjection derived class.

You'll see that the parcesToInject() function won't necessarily return a positive value even if t>SOI. Here it introduces some randomness to the injection process while still meeting the concentration criteria you set in the kinematicCloud dictionary. My understanding is the purpose is to remove a timestep dependency to the injection rates. I actually think its a pretty clever implementation.

I hope that helps!

Cheers,
Kyle
kmooney 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
problem with solving lagrange reaction cloud Polli OpenFOAM Running, Solving & CFD 0 April 30, 2014 07:53
Possible Bug in pimpleFoam (or createPatch) (or fluent3DMeshToFoam) cfdonline2mohsen OpenFOAM 3 October 21, 2013 09:28
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 17:44
How to start a room model with heat object steveleung Main CFD Forum 0 February 24, 2011 04:38
about group injection of DPM model zwdi FLUENT 5 April 12, 2004 19:31


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