CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

How to change the number of parcels at each patch with simulation time step

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 30, 2018, 01:50
Default How to change the number of parcels at each patch with simulation time step
  #1
Member
 
AJAY BHANDARI
Join Date: Jul 2015
Location: INDIA
Posts: 57
Rep Power: 10
AJAY BHANDARI is on a distinguished road
Hi Bruno,

Thanks for your reply. I will see whether brownian motion can be used in my case or not.

But before that can you please help me in answering the following questions

I already explained my problem in my previous post and i am using uncoupled kinematicparcelfoam for coupling lagrangian particles with the eulerian one. Now in that i have to do two things.

1. I have to enter different number of parcels at each patch in the computational domain. Can you tell me the best injection model to do that?? So far I know only manual injection or patch injection

2. Next, in my case as simulation time step changes the number of particles at each patch change. So please tell how can i do that in my problem?? Where i have to do the changes and how to do that changes so that i can change the number of particles at each patch with simulation time step??

If some more description om my problem is needed. Please tell

Best
Ajay

[Moderator note: Moved from SaffmanMeiLiftForce]

Last edited by wyldckat; September 1, 2018 at 14:10. Reason: see "Moderator note:"
AJAY BHANDARI is offline   Reply With Quote

Old   September 1, 2018, 15:49
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answers: I've moved your post to a new thread, given that it was not related anymore to the other thread.


Quote:
Originally Posted by AJAY BHANDARI View Post
1. I have to enter different number of parcels at each patch in the computational domain. Can you tell me the best injection model to do that?? So far I know only manual injection or patch injection
You can define one injection block for each patch, you don't need to define all patches in a single block. If you had provided an example of how you were defining one of the blocks, I could have given the modified example.


Quote:
Originally Posted by AJAY BHANDARI View Post
2. Next, in my case as simulation time step changes the number of particles at each patch change. So please tell how can i do that in my problem?? Where i have to do the changes and how to do that changes so that i can change the number of particles at each patch with simulation time step??
Without knowing how exactly you will get the different particle distributions, it's extremely hard to try and explain several different ways you could do that.
The best I can do is suggest that you study all of the injection models that exist. You can find a graph with the existing models here: https://cpp.openfoam.org/v6/classFoa...tionModel.html
Then based on the features available on each model, then you can decide how to create a new model that does what you want.

Quote:
Originally Posted by AJAY BHANDARI View Post
If some more description om my problem is needed. Please tell
This thread: How to give enough info to get help - was written also because it's hard for experienced users to find the time needed to help here on the forum. What I mean is that I will possibly only be able to take a look at this thread of your in 7 days from now, which means that since you didn't provide enough information when you wrote your post, I'm not able to help further any sooner.
__________________
wyldckat is offline   Reply With Quote

Old   September 5, 2018, 08:55
Post
  #3
Member
 
AJAY BHANDARI
Join Date: Jul 2015
Location: INDIA
Posts: 57
Rep Power: 10
AJAY BHANDARI is on a distinguished road
Hi bruno,

By patch i mean each mesh element.

What i mean to say is that suppose there is a rectangular computational domain in which there are 500 mesh elements.

1. Now i want to enter particles at each mesh element in the computational domain.

2. Now further i want to change the number of particles at each mesh element as simulation time step progresses.
For example: if at one mesh element if i add a manual injector and give the particle coordinates to be injected and lets say particles added are 4. Then at the next time step at the same coordinate i have to inject let's say 2 particles and so on.
Then how to do that.

One solution, which i am trying is that to add different injection models (manual injector) in the kinematic cloud properties and from each manual injector i am reading kinematic cloud positions file (in which the coordinates and no. of parcels at each mesh element are specified).
And for time i am specifying different Start of injection (SOI) for each injector model.

A sample i am attaching.

Code:
injectionModels
    {
    model1
        {
            type            manualInjection;
            massTotal       0;
            parcelBasisType fixed;
            nParticle       1;
            SOI             32;
            positionsFile   "kinematicCloudPositions";
            U0              (1E-06 1E-06 1E-06);
            sizeDistribution
            {
                type        fixedValue;
                fixedValueDistribution
                {
                    value   0.006;
                }
            }
        }
        model2
        {
            type            manualInjection;
            massTotal       0;
            parcelBasisType fixed;
            nParticle       1;
            SOI             36;
            positionsFile   "kinematicCloudPositions1";
            U0              (1E-06 1E-06 1E-06);
            sizeDistribution
            {
                type        fixedValue;
                fixedValueDistribution
                {
                    value   0.006;
                }
            }
        }
    }
So you can see that from injector 1 when it reads kinematiccloudpostions file it injects particles at each mesh element according to the coordinates given in the file. Here SOI is 32 sec.

Next for injector 2 when it reads kinematiccloudpostions1 file it injects particles at each mesh element according to the coordinates given in the file and SOI is 36 sec.

So this is how i am doing to update number of particles with time step..

I am asking whether i am doping right or not..

Or is there any other way to do that.

Hope i am able to explain my problem.
AJAY BHANDARI is offline   Reply With Quote

Old   September 11, 2018, 08:18
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick note: I haven't managed to read your post properly yet, but I've stumbled upon a tutorial/report at Chalmers which may be useful to what you want to do exactly: http://www.tfd.chalmers.se/~hani/kur.../tutorial1.pdf - Start reading from chapter 5.
wyldckat is offline   Reply With Quote

Old   November 19, 2018, 07:46
Post Doubt
  #5
Member
 
AJAY BHANDARI
Join Date: Jul 2015
Location: INDIA
Posts: 57
Rep Power: 10
AJAY BHANDARI is on a distinguished road
Hi Bruno,


i read the report you sent to me and accordingly i changed the libraries which were needed to inject different particles at different mesh elements. But now one problem is coming.
When i run the case the running process on the terminal gets stuck on this line.
Code:
Time = 32

GAMG:  Solving for p, Initial residual = 4.28364e-09, Final residual = 4.28364e-09, No Iterations 0
DILUPBiCG:  Solving for C, Initial residual = 1, Final residual = 1.20517e-10, No Iterations 7

Evolving kinematicCloud

Solving 3-D cloud kinematicCloud
Cloud: kinematicCloud
    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
    model2:
        number of parcels added     = 0
        mass introduced             = 0
    Parcel fate (number, mass)
      - escape                      = 0, 0
      - stick                       = 0, 0
    Rotational kinetic energy       = 0

ExecutionTime = 10.57 s  ClockTime = 10 s

Time = 36

GAMG:  Solving for p, Initial residual = 4.28364e-09, Final residual = 4.28364e-09, No Iterations 0
DILUPBiCG:  Solving for C, Initial residual = 0.0369848, Final residual = 5.41162e-10, No Iterations 6

Evolving kinematicCloud

Solving 3-D cloud kinematicCloud
Time1 = 4

Time0 = 0

parcelsToInject = 5


Cloud: kinematicCloud injector: model1
    Added 5 new parcels

    201277314 move-collide subCycles

After this nothing is happening. Please help me in this regard.



PS i am not able to attach my test case here as i am getting this error message


Your submission could not be processed because a security token was missing.

If this occurred unexpectedly, please inform the administrator and describe the action you performed before you received this error.
AJAY BHANDARI is offline   Reply With Quote

Old   December 22, 2018, 11:58
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Ajay,

Sorry, I had some very busy weeks since before your last post and I was not able to come by and see your post.

From what I can briefly see, the problem seems to be that somehow it suddenly had 201277314 sub-cycles to analyze for collisions between only 5 parcels or particles, which is really strange.

If customized code is involved, then something went wrong in its coding and there could be memory corruption happening somewhere.

Either way, I hope you've managed to solve this issue since then.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   December 23, 2018, 01:08
Post
  #7
Member
 
AJAY BHANDARI
Join Date: Jul 2015
Location: INDIA
Posts: 57
Rep Power: 10
AJAY BHANDARI is on a distinguished road
Hi bruno,

Glad you have a look at my error message.

I was able to resolve it when i changed basickinematiccollidingcloud to basicKinematiccloud in createFields and the basic code.

By changing this the solver ran.

But i have one doubt.

1. By changing this does it mean that there will be colliding of parcels now?

2. If i have to incorporate the colliding of parcels (4 way coupling). How should i do it? What changes should i make in the solver and code??

Best
Ajay
AJAY BHANDARI is offline   Reply With Quote

Old   December 23, 2018, 16:49
Default
  #8
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answers:
  1. "basicKinematicCloud" does not handle collisions between particles.
  2. Depends on the type of collisions you want to do, namely if you want stochastic collisions (semi-random collisions, in function of the parcel size and presence in the same cell) or discrete particle collisions between each pair of particles (parcels).
  3. As for 4-way collisions... I'm not entirely familiar with the terminology... what types of collisions are you referring to? Because if I remember correctly, the discrete collision models that OpenFOAM has does not handle break up and coalescence...
  4. When you were using "basicKinematicCollidingCloud", how exactly did you configure the collision part in the dictionary file?
wyldckat 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
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field lakeat OpenFOAM Community Contributions 58 December 23, 2021 02:36
Stuck in a Rut- interDyMFoam! xoitx OpenFOAM Running, Solving & CFD 14 March 25, 2016 07:09
[OpenFOAM.org] OF2.3.1 + OS13.2 - Trying to use the dummy Pstream library aylalisa OpenFOAM Installation 23 June 15, 2015 14:49
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 15:33
plot over time fferroni OpenFOAM Post-Processing 7 June 8, 2012 07:56


All times are GMT -4. The time now is 15:45.