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

How to make ManualInjection time dependent

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 12, 2015, 06:20
Default How to make ManualInjection time dependent
  #1
Member
 
Join Date: Jul 2012
Posts: 67
Rep Power: 14
Carlen is on a distinguished road
Hi everyone,
I am now modifying the ManualInjection model of OF2.3.1 to allow particleS of different properties to be injected at every timestep. I wrote a IOdictionary that allows the automatic rereading of particle postions, diameters and velocities. From the logfile below you can see that such a Dictionary is read at every timestep. However, the particles are not injected accordingly.
Code:
regIOobject::readIfModified() : 
    Re-reading object sprayCloudPositions from file "/home/carlen/OpenFOAM/carlen-2.3.1/carlenVOFLPT/run/VOFLPT/constant/Secondary/sprayCloudPositions"
regIOobject::readIfModified() : 
    Re-reading object sprayCloudVelocities from file "/home/carlen/OpenFOAM/carlen-2.3.1/carlenVOFLPT/run/VOFLPT/constant/Secondary/sprayCloudVelocities"
regIOobject::readIfModified() : 
    Re-reading object sprayCloudDiameters from file "/home/carlen/OpenFOAM/carlen-2.3.1/carlenVOFLPT/run/VOFLPT/constant/Secondary/sprayCloudDiameters"
Courant Number mean: 2.4615003e-07 max: 0.0014217271
Courant Number mean: 3.7985957e-06 max: 3.924e-06
Max Courant Number: 0.0014217271
deltaT = 0.0001
Time = 0.0002

MULES: Solving for alpha.water
Liquid phase volume fraction = 4.6875e-05  Min(alpha1) = 0  Min(alpha2) = 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
smoothSolver:  Solving for T, Initial residual = 1.5245762e-07, Final residual = 2.5596714e-13, No Iterations 1
min(T) 300
GAMG:  Solving for p_rgh, Initial residual = 0.85150808, Final residual = 0.0021843274, No Iterations 3
max(U) 1.3741028
min(p_rgh) 99764.018
GAMGPCG:  Solving for p_rgh, Initial residual = 0.079965064, Final residual = 5.2407171e-08, No Iterations 5
max(U) 0.17640096
min(p_rgh) 99987.999

Solving 3-D cloud sprayCloud
Cloud: sprayCloud
    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
    D10, D32, Dmax (mu)             = 0, 0, 0
    Liquid penetration 95% mass (m) = 0

diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 3.8920766e-09, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 4.420232e-09, No Iterations 2
smoothSolver:  Solving for Uz, Initial residual = 1, Final residual = 3.9743131e-09, No Iterations 2
DILUPBiCG:  Solving for O2, Initial residual = 0.00083242377, Final residual = 4.3944334e-08, No Iterations 1
DILUPBiCG:  Solving for H2O, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG:  Solving for h, Initial residual = 0.00059659358, Final residual = 1.245717e-08, No Iterations 1
T gas min/max   = 300, 300
GAMG:  Solving for p, Initial residual = 0.99999999, Final residual = 0.050075538, No Iterations 1
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 9.8099024e-08, global = -2.729417e-16, cumulative = -2.729417e-16
GAMG:  Solving for p, Initial residual = 0.024331341, Final residual = 1.2388827e-07, No Iterations 4
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 9.8098944e-08, global = -2.7209419e-16, cumulative = -5.4503589e-16
smoothSolver:  Solving for epsilon, Initial residual = 0.058494388, Final residual = 1.5872662e-10, No Iterations 2
smoothSolver:  Solving for k, Initial residual = 1, Final residual = 4.525064e-09, No Iterations 2
ExecutionTime = 347.26 s
I have looked into the source code of manual injection model and I added a duration_ parameter just like the patchInjection model. Now I can have new particles injected at every timestep but their properties remain the same as the first timestep. They are not being updated! Basically I want the solver to read the particle properties from a properties dictionary at every time step and inject them in the field. How can I solve this problem?

Thank you in advance,
carlen
Carlen is offline   Reply With Quote

Old   May 17, 2016, 09:37
Default
  #2
Member
 
Ali
Join Date: Oct 2013
Location: Scotland
Posts: 66
Rep Power: 13
ali.m.1 is on a distinguished road
Hi Carlen

I'm stuck on a similar problem as you. I'm wondering how you managed to make the solver re-read the dictionaries? Would you be able to share the code for doing so please?

Ali
ali.m.1 is offline   Reply With Quote

Old   June 8, 2016, 00:35
Default
  #3
Member
 
Ping Chang
Join Date: Feb 2016
Location: Perth
Posts: 93
Rep Power: 10
chpjz0391 is on a distinguished road
Quote:
Originally Posted by ali.m.1 View Post
Hi Carlen

I'm stuck on a similar problem as you. I'm wondering how you managed to make the solver re-read the dictionaries? Would you be able to share the code for doing so please?

Ali
Hi ali,

I met the same problem as you, The particles' information always same as the first step. I have no idea what's going on.

Have you solved your problem?

Ping
chpjz0391 is offline   Reply With Quote

Old   September 12, 2016, 04:53
Default
  #4
Member
 
Ali
Join Date: Oct 2013
Location: Scotland
Posts: 66
Rep Power: 13
ali.m.1 is on a distinguished road
Hi Ping

No I haven't. I'll post up if I do though.

Have you managed?

Ali
ali.m.1 is offline   Reply With Quote

Old   March 2, 2018, 19:00
Default
  #5
Member
 
Join Date: Oct 2015
Posts: 63
Rep Power: 11
Scram_1 is on a distinguished road
Hi,
Has anyone successfully solved this problem? I also want to inject particles at different points in time. Say, for instance at t = 0, i.e., initially 20 particles get injected into the domain. In the next time step, no particle is injected. In the third time step, around 5 particles get injected and so on. I have a file which has data concerned with the number of particles injected at different time steps. How can I sync this with manual injection in OpenFOAM?
In a nut shell, instead of specifying the position, I want to specify the time when a particle gets injected into the domain.
Any suggestions / advice in this regard is greatly appreciated!!

Thanks!!

Best,
Scram_1
Scram_1 is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
AMI speed performance danny123 OpenFOAM 21 October 24, 2020 05:13
AMI interDyMFoam for mixer nu problem danny123 OpenFOAM Programming & Development 8 September 6, 2013 03:34
plot over time fferroni OpenFOAM Post-Processing 7 June 8, 2012 08:56
Regarding FoamX running Kindly help out hariya03 OpenFOAM Pre-Processing 0 April 18, 2008 05:26
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 03:58


All times are GMT -4. The time now is 08:43.