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

incorporate energy equation to DPMFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By floquation

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 31, 2016, 14:02
Default incorporate energy equation in DPMFoam
  #1
Member
 
Bijan Darbari
Join Date: Nov 2015
Posts: 48
Rep Power: 10
bijan darbari is on a distinguished road
Dear all

I,m trying to incorporate Temperature field and the Energy equation in "DPMFoam" solver. So I do these main steps.

1- create "EEqn.H":
Code:
fvScalarMatrix EEqn
        (
            fvm::ddt(T)
            + fvm::div(alphaPhic, T)
            - fvm::laplacian(DT, T)
        );
EEqn.relax();

2- add "#include EEqn.H" in "DPMFoam.c",just after pimple loop

3- create temperature field and "DT" in "createFields.H"

Code:
IOdictionary transportProperties
(
    IOobject
    (
        "transportProperties",
        runTime.constant(),
        mesh,
        IOobject::MUST_READ_IF_MODIFIED,
        IOobject::NO_WRITE
    )
);
word continuousPhaseName
(
    transportProperties.lookup("continuousPhaseName")
);

dimensionedScalar DT
(
    transportProperties.lookup("DT")
);

Info<< "Reading field T\n" << endl;
volScalarField T
(
    IOobject
    (
        "T",
        runTime.timeName(),
        mesh,
        IOobject::MUST_READ,
        IOobject::AUTO_WRITE
    ),
    mesh
);
4- rename this solver to "DPMH"

this solver compiled successfully without any error.

but when I try to solve a simple test case, I get this error:

Code:
--> FOAM FATAL IO ERROR: 
wrong token type - expected word, found on line 19 the label 100

file: /home/bijan/Desktop/mycase1/constant/transportProperties.DT at line 19.

    From function operator>>(Istream&, word&)
    in file primitives/strings/word/wordIO.C at line 74.

FOAM exiting
The solver and test case attached.
DPMH.zip

mycase1.zip

Please kindly guide me.

Last edited by bijan darbari; April 1, 2016 at 00:11.
bijan darbari is offline   Reply With Quote

Old   April 1, 2016, 02:35
Default
  #2
Senior Member
 
floquation's Avatar
 
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 20
floquation will become famous soon enough
I'm no expert, but given the error message I'd first try the following:

Change (constant/transportProperties)
Quote:
DT 0.001;
into
Quote:
DT.air 0.001;
as it is apparently looking for a "word" after "DT", I suspect ".air" must be written there.
bijan darbari likes this.
floquation is offline   Reply With Quote

Old   April 1, 2016, 09:05
Default
  #3
Member
 
Bijan Darbari
Join Date: Nov 2015
Posts: 48
Rep Power: 10
bijan darbari is on a distinguished road
Thanks very much floquation.

I used this code and the case run without any problem. so calculate the temperature filed of continuous phase.
Code:
DT        DT [0 2 -1 0 0 0 0] 1.42e-7;
the modified solver:
DPMH.zip

but still my modified solver don't calculate the temperature field of particles.

in the following, I'll try to incorporate heat transfer equation to particles cloud.
bijan darbari is offline   Reply With Quote

Old   April 7, 2016, 09:44
Default
  #4
Member
 
Bijan Darbari
Join Date: Nov 2015
Posts: 48
Rep Power: 10
bijan darbari is on a distinguished road
Dear all

As I mentioned earlier, I want to solve the heat transfer equation for
lagrangian particles in DPMFoam solver.

Fortunately, it can be done by openfoam standard "basicThermoCloud"
(without considering the colliding effect). Therefore, I do following
step in in my modified solver:

1- in "DPMH.C", I replace:

Code:
#ifdef MPPIC
    #include "basicThermoCloud.H"
    #define basicKinematicTypeCloud basicThermoCloud
#else
    #include "basicThermoCloud.H"
    #define basicKinematicTypeCloud basicThermoCloud
#endif
2- in "createFields", I add:


Code:
Info<< "Constructing kinematicCloud " << kinematicCloudName << endl;
basicKinematicTypeCloud basicThermoCloud
(
    kinematicCloudName,
    rhoc,
    Uc,
    muc,
    slgThermo,
   g
    
);
3- in "make/options", I add:

Code:
-I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \
    -I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \
    -I$(LIB_SRC)/thermophysicalModels/properties/solidProperties/lnInclude \
    -I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \
    -I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
    -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
    -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
    -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
    -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
and
Code:
 -lliquidProperties \
    -lliquidMixtureProperties \
    -lsolidProperties \
    -lsolidMixtureProperties \
    -lthermophysicalFunctions \
    -lreactionThermophysicalModels \
    -lSLGThermo \
    -lchemistryModel \
    -lradiationModels \
4- in the the beginning of "DPMH.C", I add:

Code:
#include "SLGThermo.H"
and I compile this solver. but I get this error:

Code:
In file included from DPMHP.C:68:0:
createFields.H: In function ‘int main(int, char**)’:
createFields.H:159:5: error: ‘slgThermo’ was not declared in this scope
     slgThermo,
What is the solution??

In the other words, How I can import the thermophysical properties of
continuous phase (K,Cp,...) to "basicThermoCloud" as input parameters
when I use the "constant transport properties" in the Constant Directory??

This solver have been attached.
Attached Files
File Type: zip DPMHP.zip (7.1 KB, 23 views)
bijan darbari is offline   Reply With Quote

Old   April 10, 2016, 12:54
Default
  #5
Member
 
Bijan Darbari
Join Date: Nov 2015
Posts: 48
Rep Power: 10
bijan darbari is on a distinguished road
I'm looking forward to hear from you soon
bijan darbari is offline   Reply With Quote

Old   December 2, 2016, 20:46
Default
  #6
Member
 
Join Date: Oct 2015
Posts: 63
Rep Power: 10
Scram_1 is on a distinguished road
Hey Bijan,
did you find a work-around for solving the energy equation in DPM Foam?
Scram_1 is offline   Reply With Quote

Old   January 12, 2017, 12:06
Default
  #7
New Member
 
solti
Join Date: Jan 2017
Posts: 1
Rep Power: 0
tri3345 is on a distinguished road
Dear Bijan ,
could you solve the error?, I have a problem same as you, in a simulation I need the temperature of particles in DPMFoam, Can you guide me?
tri3345 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
Energy equation issue zytra FLUENT 0 October 20, 2014 21:34
Need experience comment on cavitation combine energy equation!!! lehoanganh07 FLUENT 0 September 24, 2014 10:28
Energy equation in OpenFoam nwpukaka OpenFOAM Programming & Development 2 June 24, 2014 02:40
energy equation in rhoCentralFoam nakul OpenFOAM 0 October 10, 2010 15:07
SIMPLE and energy equation convergence Fabio Main CFD Forum 0 June 1, 2007 06:06


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