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

Adding heat generation and transfer to DPMFoam inc. buoyancy of fluid

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 19, 2018, 18:01
Default Adding heat generation and transfer to DPMFoam inc. buoyancy of fluid
  #1
Member
 
Robert
Join Date: Sep 2016
Posts: 31
Rep Power: 5
dussa is on a distinguished road
Hi everyone,
I have been getting further into my efforts to include additional models to the DPMFoam solver. My idea has a couple of additions being made to the existing DPMFoam solver:
  1. Adding an internal heating model for the particles
  2. Keeping the collision modelling and 4-way coupling currently present in the solver
  3. Adding the temperature fields to the flow solver portion of DPMFoam

For the time being I am referring to my new solver as fFoam
From the above things I have determined there are multiple things that need to be done. Firstly, to address point (1) I will need to create a new cloud and parcel model. I could add a heat generation term to the Thermo[cloud,parcel] classes, however then there would not be any collision modelling, as can be seen in the basicThermoCloud.H file:

basicThermoCloud.H
Code:
namespace Foam
{
    typedef ThermoCloud
    <                        <------- Collision modelling missing
        KinematicCloud
        <
            Cloud
            <
                basicThermoParcel
            >
        >
    > basicThermoCloud;
}
So the first thing I will do is create a new cloud and parcel class as shown below, adding Thermo to the existing basicKinematicColliding[Cloud,Parcel] classes and making the necessary changes in the relevant files:

basicThermoKinematicCollidingCloud.H
Code:
namespace Foam
{
    typedef ThermoCloud
    <
        CollidingCloud      <- - - - - Collision modelling included
        <
            KinematicCloud
            <
                Cloud
                <
                    basicThermoKinematicCollidingParcel <---new parcel type
                >
            >
        >
    > basicThermoKinematicCollidingCloud;
}
basicThermoKinematicCollidingParcel.H
Code:
namespace Foam
{
    typedef ThermoParcel
            <
                CollidingParcel
                <
                    KinematicParcel
                    <
                        particle
                    >
                >
            > basicThermoKinematicCollidingParcel;
There is a report by a student from Chalmers University about addition of a decay heat submodel which I base my implementation of an internal heat generation term off: Implementation of decay heat model as a submodel in lagrangian library for reactingParcelFoam solver. This takes care of point (1) and half of point (2), maintaining the collision modelling that is in the current DPMFoam solver.

Point (2) also requires the 4-way coupling of DPMFoam to remain intact (namely momentum source terms for the fluid that are influenced by the motion of the particles). This I would assume means maintaining declarations made in the DPMFoam solver and its subsequent createFields.H UcEqn.H and pEqn.H files, although because I am including ThermoCloud and ThermoParcel I assume that there will need to be some chages to these files. II have tried to emulate what happens in the reactingParcelFoam and coalChemistryFoam solvers to that end.

Point (3) means I obviously need to try to add the temperature field to the fluid portion of the solver, whilst I also want to include the temperature dependency of thermophysical properties (but initially only the density of the fluid). I have looked at the existing flow solvers and my criteria. It appears that buoyantPimpleFoam would be a good candidate to attempt to implement in fFoam.

Questions
I am only interested in simple internal energy in the particles, no phase change or surface reactions. I am having some trouble understanding what I should do to include the temperature in the solver. Currently there seems to be a couple ways various solvers include Temperature (T).
  • coalChemistryFoam and reactingParcelFoam both use a term that is
    Code:
    const volScalarField& T = thermo.T();
  • other solver like buoyantBoussinesqPimpleFoam include the temperature field explicitly in the createFields.H file such as
    Code:
    Info<< "Reading field T\n" << endl;
    volScalarField T
    (
        IOobject
        (
            "T",
            runTime.timeName(),
            mesh,
            IOobject::MUST_READ,
            IOobject::AUTO_WRITE
        ),
        mesh
    );

My question is; does anyone have an idea how I should implement the liquid phase temperature field in my solver, as there will also be a temperature of the solid phase that would be tracked independently of the fluid phase. Also, if anyone can explain to me how the line const volScalarField& T = thermo.T(); works that would be greatly appreciated too.
I will keep this thread updated with any progress I make,

kind regards,
Robert
dussa is offline   Reply With Quote

Old   April 30, 2018, 21:26
Default
  #2
Member
 
Robert
Join Date: Sep 2016
Posts: 31
Rep Power: 5
dussa is on a distinguished road
Hi again,

I am trying to compile a new Cloud/Parcel that includes thermodynamic effects in the basicKinematicCollidingCloud/Parcel (ie. I am trying to compile basicThermoKinematicCollidingCloud/Parcel) but I keep running in to an error whilst running wmake libso. The error message is:

Code:
Make/linux64GccDPInt32Opt/parcels/derived/basicThermoKinematicCollidingParcel/makeBasicThermoKinematicCollidingParcelSubmodels.o
In file included from /home/robert/OpenFOAM/OpenFOAM-4.x/src/OpenFOAM/lnInclude/HashTable.H:51:0,
                 from /home/robert/OpenFOAM/OpenFOAM-4.x/src/OpenFOAM/lnInclude/objectRegistry.H:38,
                 from /home/robert/OpenFOAM/OpenFOAM-4.x/src/OpenFOAM/lnInclude/cloud.H:38,
                 from ../../lagrangian/basic/lnInclude/Cloud.H:39,
                 from ../../lagrangian/intermediate/lnInclude/basicThermoKinematicCollidingCloud.H:35,
                 from parcels/derived/basicThermoKinematicCollidingParcel/makeBasicThermoKinematicCollidingParcelSubmodels.C:26:
/home/robert/OpenFOAM/OpenFOAM-4.x/src/OpenFOAM/lnInclude/className.H:112:48: error: redefinition of ‘const Foam::word Foam::StochasticCollisionModel<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > >::typeName’
     defineTemplateTypeNameWithName(Type, Type::typeName_())
It seems to say that when it is trying to compile makeBasicThermoKinematicCollidingParcelSubmodels.o that it is redefining 'const Foam::word Foam::StochasticCollisionModel<Foam....' etc. etc. (please see error message above). I have tried looking for where const Foam::word Foam::StochasticCollisionModel is defined originally, but I have failed to find anything.

I managed to get the library to compile by removing

#̶i̶n̶c̶l̶u̶d̶e̶ ̶"̶m̶a̶k̶e̶P̶a̶r̶c̶e̶l̶S̶t̶o̶c̶h̶a̶s̶t̶i̶c̶C̶o̶l̶l ̶i̶s̶i̶o̶n̶M̶o̶d̶e̶l̶s̶.̶H̶"̶
and
m̶a̶k̶e̶P̶a̶r̶c̶e̶l̶S̶t̶o̶c̶h̶a̶s̶t̶i̶c̶C̶o̶l̶l̶i̶ s̶i̶o̶n̶M̶o̶d̶e̶l̶s̶(̶b̶a̶s̶i̶c̶T̶h̶e̶r̶m̶o̶K̶i̶n̶ e̶m̶a̶t̶i̶c̶C̶o̶l̶l̶i̶d̶i̶n̶g̶C̶l̶o̶u̶d̶)̶;̶

from makeBasicThermoKinematicCollidingParcelSubmodels.C. I did this because I noticed that makeParcelStochasticCollisionModels.H only contains:
Code:
#include "NoStochasticCollision.H"
So it seems strange that makeParcelStochasticCollisionModels.H is included in the first place, as it is implementing the case of NoStochasticCollision.H.
Regardless, when I have run simulations with the standard basicKinematicCollidingCloud/Parcels (as used in DPMFoam) I have always had the stochasticCollisions set to none in $CASE_DIR/constant/kinematicCloudProperties file:
Code:
stochasticCollisionModel none;
If anyone see's an error with me excluding these StochasticCollisionModels from my basicThermoKinematicColliding[Cloud/Parcel]'s then please let me know. I will continue now with trying to implement them and reply with any progress/problems in case anyone is interested.

Rob.
dussa is offline   Reply With Quote

Old   September 18, 2019, 15:05
Default
  #3
New Member
 
Gerrit Botha
Join Date: Feb 2018
Posts: 2
Rep Power: 0
gbot is on a distinguished road
Hi Rob


Have you figured out your problem. If show would you mind sharing as I also need to add temperature to DPMFoam.


Kind Regards
gbot is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF for mass and heat source with heat transfer rajendra1 Fluent UDF and Scheme Programming 35 October 13, 2017 05:04
ICEM - mesh generation for conjugate heat transfer problems tmu Mesh Generation & Pre-Processing 0 March 4, 2016 05:21
Radiation interface hinca CFX 15 January 26, 2014 18:11
Heat transfer from a heated plate using fins pathakamit FLUENT 1 April 30, 2013 05:07
Water subcooled boiling Attesz CFX 7 January 5, 2013 04:32


All times are GMT -4. The time now is 03:50.