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

uncoupledKinematicParcelFoam Examples

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

Reply
 
LinkBack Thread Tools Display Modes
Old   September 30, 2010, 02:17
Default uncoupledKinematicParcelFoam Examples
  #1
New Member
 
Chris Butler
Join Date: Jun 2010
Posts: 21
Rep Power: 7
chrisb is on a distinguished road
Hi all,
I am trying to do some simple Lagrangian particle calculations with OpenFOAM.
The actual computation of the particles is relatively simple:
One case with solid particles within an incompressible flow
One case with massless infinitesimal particles (i.e. stream tracers calculated within OF).

I need to do this with respect to both a steady state and unsteady flow field.

I have two questions then:
1) Is uncoupledKinematicParcelFoam the right solver for for the the problem at hand? It looks to me like it may not be able to evolve over a changing flow field.

2) How do I setup a case with uncoupledKinematicParcelFoam? Everything seems to go to hell when I need a temperature field for my fluid.

Cheers,
Chris Butler
chrisb is offline   Reply With Quote

Old   October 1, 2010, 02:59
Default
  #2
Member
 
matej forman
Join Date: Mar 2009
Location: Brno, Czech Republic
Posts: 91
Rep Power: 8
matejfor is on a distinguished road
Hi,
the nature of all ways how to compute the particles in OpenFoam is transient.
uncoupledKinematicParcelFoam can be used for computation of a flow field already computed. The solver reads this field and does numerical integration of lagrangian equations on it using kinematicParcel class. So it's a kind of aposteriori method. You can use it for changing flow-field, but you need appropriate frequency of time steps stored.

The steady-state issue - if you have a steady state flow you may run a transient computation with large time steps for long enough time for particle to pass through the domain.

The temperature issue - the kinematicParcel cloud is defining isothermal particles.
you would need to use thermalParcel or if you want reactions, reactingParcel class.
They are all described in $FOAM/src/lagrangian/intermediate.
It looks very messy and complicated but it's not that bad.

For your application you can use several approaches:
(1) adopt the uncoupledKinematicParcelFoam to thermalParcel
(2) use some solver which computes the particles together with the flowfield (especially if the particles are exchanging heat with the surrounding, yoy shoud run the particles together with the flow anyway) like reactingParcelFoam without the reactions.
(3) use spray class.

good luck
matej
matejfor is offline   Reply With Quote

Old   October 3, 2010, 21:03
Default
  #3
New Member
 
Chris Butler
Join Date: Jun 2010
Posts: 21
Rep Power: 7
chrisb is on a distinguished road
Quote:
Originally Posted by matejfor View Post
Hi,
the nature of all ways how to compute the particles in OpenFoam is transient.
uncoupledKinematicParcelFoam can be used for computation of a flow field already computed. The solver reads this field and does numerical integration of lagrangian equations on it using kinematicParcel class. So it's a kind of aposteriori method. You can use it for changing flow-field, but you need appropriate frequency of time steps stored.

The steady-state issue - if you have a steady state flow you may run a transient computation with large time steps for long enough time for particle to pass through the domain.

The temperature issue - the kinematicParcel cloud is defining isothermal particles.
you would need to use thermalParcel or if you want reactions, reactingParcel class.
They are all described in $FOAM/src/lagrangian/intermediate.
It looks very messy and complicated but it's not that bad.

For your application you can use several approaches:
(1) adopt the uncoupledKinematicParcelFoam to thermalParcel
(2) use some solver which computes the particles together with the flowfield (especially if the particles are exchanging heat with the surrounding, yoy shoud run the particles together with the flow anyway) like reactingParcelFoam without the reactions.
(3) use spray class.

good luck
matej
Hi matej,

It seems that I had a more fundamental problem than I thought. Now my C++ is pretty poor, however, I think the problem is that the basicKinematicCloud constructor (inherited from KinematicCloud) presumes a compressible field (i.e. requires volumetric fields for rho and mu). This is also reflected in createFields.H for the solver.

For incompressible solvers I think that the passiveParticle library is what needs to be used.

Chris Butler
chrisb is offline   Reply With Quote

Old   October 4, 2010, 04:05
Default
  #4
Member
 
matej forman
Join Date: Mar 2009
Location: Brno, Czech Republic
Posts: 91
Rep Power: 8
matejfor is on a distinguished road
Hi Chris,
You are right you need density and viscosity of the fluid to calculate the drag. But you may easily create these fields in the start directory and use this approach. Or you may use passive scalar as well. There are several ways. It is true that the passive scalar seems to be more easy to understand the code.

good luck
matej
matejfor is offline   Reply With Quote

Old   October 6, 2010, 00:26
Default passiveParticleCloud Help!
  #5
New Member
 
Chris Butler
Join Date: Jun 2010
Posts: 21
Rep Power: 7
chrisb is on a distinguished road
Hi all,
Wondering if anyone has had success with passiveParticleFoam. I am am trying (as a first stage) to re-implement uncoupledKinematicParcelFoam for a incompressible solver. I am having trouble finding how to 'evolve' the particles. I think the function is:
Foam::Cloud::move()
However, my C++ is rudimentary and I don't quite understand the follow error:
passiveParticleParcelFoam.C:61:21: error: no matching function for call to ‘Foam:assiveParticleCloud::move()’


Any help would be much appreciated.

Chris Butler
Attached Files
File Type: gz passiveParticleParcelFoam.tar.gz (3.3 KB, 28 views)
chrisb is offline   Reply With Quote

Old   October 6, 2010, 03:15
Default
  #6
Member
 
matej forman
Join Date: Mar 2009
Location: Brno, Czech Republic
Posts: 91
Rep Power: 8
matejfor is on a distinguished road
Hi Chris,

the error clearly saiz what's wrong. There is no function move() for passiveParticleCloud defined. You should have the definition in the definition of class passiveParticleCloud. The compiler cannot find it.

Now the thing with the compressibility.... The computation of uncoupledKinematicParcelFoam is not compressible at all. Look where the mu a rho is used in the code. You will find that it's used only for the particles the fluid flow is still incompressible. the mu and rho is there only for the implementation reasons as when you extend the kinematic to thermal cloud, you have rho and mu in the field anyway so you do not need to have extra overloading of the clouds.

good luck with you c++

matej
matejfor is offline   Reply With Quote

Old   October 6, 2010, 22:56
Default
  #7
New Member
 
Chris Butler
Join Date: Jun 2010
Posts: 21
Rep Power: 7
chrisb is on a distinguished road
Hi Matej,

I figured out my confusion. Because the Cloud class was templat'ed it did not inherit Foam::Cloud::move(). I think that you are right that the existing uncoupledKinematicParcelFoam will be easier to work with. It looks like passiveParticleCloud is not implemented. All i have to do is trick KinematicCloud into thinking I have a density field.


Chris Butler
chrisb 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
VOF examples needed, please! Freeman FLUENT 5 February 3, 2011 17:28
Examples of microfluids A Siddiqui Main CFD Forum 3 November 8, 2005 04:03
SIMPLE, SIMPLER Examples Maciej Matyka Main CFD Forum 9 November 3, 2003 06:11
examples of simulation on room ventilation? lei FLUENT 1 June 20, 2003 22:38
Wanted: Examples of Deforming Meshes Greg Perkins Main CFD Forum 3 June 25, 2001 08:10


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