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

Adding Thermo to basicKinematicCollidingCloud

Register Blogs Community New Posts Updated Threads Search

Like Tree11Likes
  • 2 Post By bruce
  • 6 Post By bruce
  • 1 Post By Shuai_W
  • 2 Post By chpjz0391

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 29, 2011, 09:14
Default Adding Thermo to basicKinematicCollidingCloud
  #1
Member
 
bruce
Join Date: May 2009
Location: Germany
Posts: 42
Rep Power: 16
bruce is on a distinguished road
hello all,

now i add Thermo to basicKinematicCollidingCloud and basicKinematicCollidingParcel in order to simulate heat transfer for KinematicCollidingCloud.

first i copy and renamed basicKinematicCollidingCloud to basicThermoKinematicCollidingCloud and done neccesary changes.

basicThermoKinematicCollidingCloud.H as
HTML Code:
namespace Foam
{
    typedef ThermoCloud
    <
        CollidingCloud
        <
            KinematicCloud
            <
                Cloud
                <
                    basicThermoKinematicCollidingParcel
                >
            >
        >
    > basicThermoKinematicCollidingCloud;
}
and basicThermoKinematicCollidingParcel.H as
HTML Code:
namespace Foam
{
    typedef ThermoParcel<CollidingParcel<KinematicParcel<particle> > > basicThermoKinematicCollidingParcel;

    template<>
    inline bool contiguous<basicThermoKinematicCollidingParcel>()
    {
        return true;
    }
}
defineBasicThermoKinematicCollidingParcel.C as
HTML Code:
namespace Foam
{
   defineTemplateTypeNameAndDebug(basicThermoKinematicCollidingParcel, 0);

   defineTemplateTypeNameAndDebug(Cloud<basicThermoKinematicCollidingParcel>, 0);
}
finnally makeBasicThermoKinematicCollidingParcelSubmodels.C as
HTML Code:
namespace Foam
{
    makeParcelCloudFunctionObjects(basicThermoKinematicCollidingCloud);

    // Kinematic sub-models
    makeThermoParcelForces(basicThermoKinematicCollidingCloud);
    makeParcelDispersionModels(basicThermoKinematicCollidingCloud);

    makeParcelCollisionModels(basicThermoKinematicCollidingCloud);
    makeParcelInjectionModels(basicThermoKinematicCollidingCloud);
    makeParcelPatchInteractionModels(basicThermoKinematicCollidingCloud);

    // Thermo sub-models
    makeParcelHeatTransferModels(basicThermoKinematicCollidingCloud);
    makeParcelSurfaceFilmModels(basicThermoKinematicCollidingCloud);
}
and i compile this new library as libbasicThermoKinematicCollidingParcel.so

and now i link this new type library to icoUncoupledKinematicParcelFoam solver.

and Constructing new type as

HTML Code:
basicThermoKinematicCollidingCloud kinematicParcels
(
    "kinematicCloud1",
    rho,
    U,
    g,
    slgThermo
);
now i get this link error.

HTML Code:
/lib//libbasicThermoKinematicCollidingParcel.so: undefined reference to `Foam::WallModel<Foam::CollidingCloud<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > > >::dictionaryConstructorTablePtr_'
/lib//libbasicThermoKinematicCollidingParcel.so: undefined reference to `Foam::PairModel<Foam::CollidingCloud<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > > >::dictionaryConstructorTablePtr_'
collect2: ld returned 1 exit status

Could any body help to figure out this error?

Thanks
vikramaditya91 and mbookin like this.
bruce is offline   Reply With Quote

Old   April 28, 2012, 09:41
Default
  #2
MPJ
New Member
 
Oliver Pasqual
Join Date: May 2011
Posts: 13
Rep Power: 14
MPJ is on a distinguished road
Hi bruce,
have you solved your problem?
I have the same problem with you.
although the same process have been taken as what you have done.
the same problem occur to me
it will be highly appreciated if you can give me some suggestion.
Best Regards
oliver
MPJ is offline   Reply With Quote

Old   April 28, 2012, 12:55
Default
  #3
Member
 
bruce
Join Date: May 2009
Location: Germany
Posts: 42
Rep Power: 16
bruce is on a distinguished road
hi,

the above posted problem was minimized version actually to post on this forum. but what i actually wanted work is coalCombustion library with parcel collision. so i solved this problem directly over there. take a look at the attached code. for details compare it with actual coalCombustion library.

have fun
Attached Files
File Type: zip collidingCoalCombustion.zip (19.7 KB, 280 views)
bruce is offline   Reply With Quote

Old   April 29, 2012, 05:57
Default
  #4
MPJ
New Member
 
Oliver Pasqual
Join Date: May 2011
Posts: 13
Rep Power: 14
MPJ is on a distinguished road
Hi bruce,
Many thanks!
The codes were compiled successfuly with the same modification as in your attachment.
That's really helpful, thanks for sharing your modification detail.
Have a nice day~
oliver
MPJ is offline   Reply With Quote

Old   May 8, 2013, 10:43
Default
  #5
Member
 
Join Date: Apr 2010
Posts: 61
Rep Power: 16
alquimista is on a distinguished road
Thank you very much. The trick is in :

Code:
collidingCoalCombustion/coalParcel/makeCoalParcelSubmodelsAdded.C
with:

Code:
        typedef coalCloud::collidingCloudType collidingParcelType;
    makeParcelCollisionModels(collidingParcelType);
alquimista is offline   Reply With Quote

Old   August 18, 2015, 10:47
Default How to use collidingCoalCloud
  #6
New Member
 
César Augusto Corrêa Miguéis
Join Date: Nov 2013
Location: Rio de Janeiro, Brasil
Posts: 26
Rep Power: 12
cmigueis is on a distinguished road
Hi everyone! First of all, I'd like to thank Bruce for sharing your code with us. I'm having some problems when I try to use your code. Can someone please explain how can I use the collidingCoalCloud into the coalChemistryFoam? If it's possible a step-by-step guide, I'm kind a new to OpenFOAM and I don't have an advanced level of C++ knowledge.

Thanks to all of you! Regards from Brazil!
__________________
César Miguéis
Mechanical Engineer
MSc. Student at COPPE/UFRJ
cmigueis is offline   Reply With Quote

Old   January 2, 2016, 21:54
Default drag model
  #7
New Member
 
Shuai Wang
Join Date: Mar 2014
Posts: 26
Rep Power: 12
Shuai_W is on a distinguished road
Dear all,
I encountered a problem when I use the solver coalCollidingChemistryFoam, in coalCloud1Properties, I choose particle force ErgunWenYuDrag, as below:
Quote:
particleForces
{
ErgunWenYuDrag
{
alphac alpha;
}
gravity;
}
In addition, for collsionModel, parCollision (soft-sphere colliding model) is adopted, as:
Quote:
collisionModel pairCollision;
When I run the solver coalCollidingChemistryFoam, errors appear:
Quote:
--> FOAM FATAL ERROR:
Unknown particle force type ErgunWenYuDrag, constructor not in hash table
Valid particle force types are:
11
(
BrownianMotion
SRF
SaffmanMeiLiftForce
TomiyamaLift
gravity
nonInertialFrame
nonSphereDrag
paramagnetic
pressureGradient
sphereDrag
virtualMass
)
From function ParticleForce<CloudType>::New(CloudType&, const fvMesh&, const dictionary&)
in file /home/wangshuai/OpenFOAM/OpenFOAM-2.3.1/src/lagrangian/intermediate/lnInclude/ParticleForceNew.C at line 55.
It seems that the makeThermalParcelForces.H is called in the runtimeSelection rather than makeParcelForces.H (These two files locate in lagrangian/intermediate/parcels/include).
Thus I change the code in makeCoalParcelSubmodelsAdded.C, change #include "makeThermoParcelForces.H" to #include "makeParcelForces.H", and makeThermoParcelForces(coalCloud) to makeParcelForces(coalCloud). However, errors appear again, same with the former. I don’t know how to deal it, please someone help me.
ZhangPikai likes this.
Shuai_W is offline   Reply With Quote

Old   June 14, 2016, 04:49
Default
  #8
Member
 
Ping Chang
Join Date: Feb 2016
Location: Perth
Posts: 93
Rep Power: 10
chpjz0391 is on a distinguished road
Quote:
Originally Posted by bruce View Post
hello all,

now i add Thermo to basicKinematicCollidingCloud and basicKinematicCollidingParcel in order to simulate heat transfer for KinematicCollidingCloud.

first i copy and renamed basicKinematicCollidingCloud to basicThermoKinematicCollidingCloud and done neccesary changes.

basicThermoKinematicCollidingCloud.H as
HTML Code:
namespace Foam
{
    typedef ThermoCloud
    <
        CollidingCloud
        <
            KinematicCloud
            <
                Cloud
                <
                    basicThermoKinematicCollidingParcel
                >
            >
        >
    > basicThermoKinematicCollidingCloud;
}
and basicThermoKinematicCollidingParcel.H as
HTML Code:
namespace Foam
{
    typedef ThermoParcel<CollidingParcel<KinematicParcel<particle> > > basicThermoKinematicCollidingParcel;

    template<>
    inline bool contiguous<basicThermoKinematicCollidingParcel>()
    {
        return true;
    }
}
defineBasicThermoKinematicCollidingParcel.C as
HTML Code:
namespace Foam
{
   defineTemplateTypeNameAndDebug(basicThermoKinematicCollidingParcel, 0);

   defineTemplateTypeNameAndDebug(Cloud<basicThermoKinematicCollidingParcel>, 0);
}
finnally makeBasicThermoKinematicCollidingParcelSubmodels.C as
HTML Code:
namespace Foam
{
    makeParcelCloudFunctionObjects(basicThermoKinematicCollidingCloud);

    // Kinematic sub-models
    makeThermoParcelForces(basicThermoKinematicCollidingCloud);
    makeParcelDispersionModels(basicThermoKinematicCollidingCloud);

    makeParcelCollisionModels(basicThermoKinematicCollidingCloud);
    makeParcelInjectionModels(basicThermoKinematicCollidingCloud);
    makeParcelPatchInteractionModels(basicThermoKinematicCollidingCloud);

    // Thermo sub-models
    makeParcelHeatTransferModels(basicThermoKinematicCollidingCloud);
    makeParcelSurfaceFilmModels(basicThermoKinematicCollidingCloud);
}
and i compile this new library as libbasicThermoKinematicCollidingParcel.so

and now i link this new type library to icoUncoupledKinematicParcelFoam solver.

and Constructing new type as

HTML Code:
basicThermoKinematicCollidingCloud kinematicParcels
(
    "kinematicCloud1",
    rho,
    U,
    g,
    slgThermo
);
now i get this link error.

HTML Code:
/lib//libbasicThermoKinematicCollidingParcel.so: undefined reference to `Foam::WallModel<Foam::CollidingCloud<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > > >::dictionaryConstructorTablePtr_'
/lib//libbasicThermoKinematicCollidingParcel.so: undefined reference to `Foam::PairModel<Foam::CollidingCloud<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > > >::dictionaryConstructorTablePtr_'
collect2: ld returned 1 exit status

Could any body help to figure out this error?

Thanks
Hi bruce,

I am trying to add collision model to simpleReactingParcelFoam, I followed your steps, but I met the same error as yours.

HTML Code:
/lib//libbasicThermoKinematicCollidingParcel.so: undefined reference to `Foam::WallModel<Foam::CollidingCloud<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > > >::dictionaryConstructorTablePtr_'
/lib//libbasicThermoKinematicCollidingParcel.so: undefined reference to `Foam::PairModel<Foam::CollidingCloud<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > > >::dictionaryConstructorTablePtr_'
collect2: ld returned 1 exit status
When I "typedef" in the makeBasicReactingMultiphaseSubmodels.C , I cannot even compile my lib. But when I changed the "typedef" to "makeParcelCollisionModels" . I can compile the lib successfully, but when I compible my solver I got the same errors as yours.

Do you have any suggestion?

Kind Regards,

Ping
liquidspoon and qitian2007 like this.
chpjz0391 is offline   Reply With Quote

Old   December 20, 2016, 10:08
Default
  #9
New Member
 
Zirui He
Join Date: Dec 2016
Location: Stuttgart
Posts: 3
Rep Power: 9
hurricane007 is on a distinguished road
Is it because you did not include some head file in your xxxxFoam.C?
hurricane007 is offline   Reply With Quote

Old   July 3, 2019, 08:56
Default
  #10
New Member
 
chunlei li
Join Date: Jun 2019
Posts: 6
Rep Power: 6
chunleili is on a distinguished road
Sorry for disturbing,

could you tell me what the version of OpenFOAM that you codes use?
chunleili is offline   Reply With Quote

Old   July 3, 2019, 11:28
Default
  #11
New Member
 
chunlei li
Join Date: Jun 2019
Posts: 6
Rep Power: 6
chunleili is on a distinguished road
Quote:
Originally Posted by bruce View Post
hi,

the above posted problem was minimized version actually to post on this forum. but what i actually wanted work is coalCombustion library with parcel collision. so i solved this problem directly over there. take a look at the attached code. for details compare it with actual coalCombustion library.

have fun
Hi,
could you tell me what the version of OpenFOAM that you codes work?
chunleili is offline   Reply With Quote

Old   June 26, 2021, 18:29
Default
  #12
New Member
 
SUDHA PAL
Join Date: Jun 2021
Posts: 3
Rep Power: 4
SUDHA_PAL is on a distinguished road
Quote:
Originally Posted by bruce View Post
hello all,

now i add Thermo to basicKinematicCollidingCloud and basicKinematicCollidingParcel in order to simulate heat transfer for KinematicCollidingCloud.

first i copy and renamed basicKinematicCollidingCloud to basicThermoKinematicCollidingCloud and done neccesary changes.

basicThermoKinematicCollidingCloud.H as
HTML Code:
namespace Foam{    typedef ThermoCloud    <        CollidingCloud        <            KinematicCloud            <                Cloud                <                    basicThermoKinematicCollidingParcel                >            >        >    > basicThermoKinematicCollidingCloud;}
and basicThermoKinematicCollidingParcel.H as
HTML Code:
namespace Foam{    typedef ThermoParcel<CollidingParcel<KinematicParcel<particle> > > basicThermoKinematicCollidingParcel;    template<>    inline bool contiguous<basicThermoKinematicCollidingParcel>()    {        return true;    }}
defineBasicThermoKinematicCollidingParcel.C as
HTML Code:
namespace Foam{   defineTemplateTypeNameAndDebug(basicThermoKinematicCollidingParcel, 0);   defineTemplateTypeNameAndDebug(Cloud<basicThermoKinematicCollidingParcel>, 0);}
finnally makeBasicThermoKinematicCollidingParcelSubmodels.C as
HTML Code:
namespace Foam{    makeParcelCloudFunctionObjects(basicThermoKinematicCollidingCloud);    // Kinematic sub-models    makeThermoParcelForces(basicThermoKinematicCollidingCloud);    makeParcelDispersionModels(basicThermoKinematicCollidingCloud);    makeParcelCollisionModels(basicThermoKinematicCollidingCloud);    makeParcelInjectionModels(basicThermoKinematicCollidingCloud);    makeParcelPatchInteractionModels(basicThermoKinematicCollidingCloud);    // Thermo sub-models    makeParcelHeatTransferModels(basicThermoKinematicCollidingCloud);    makeParcelSurfaceFilmModels(basicThermoKinematicCollidingCloud);}
and i compile this new library as libbasicThermoKinematicCollidingParcel.so

and now i link this new type library to icoUncoupledKinematicParcelFoam solver.

and Constructing new type as

HTML Code:
basicThermoKinematicCollidingCloud kinematicParcels(    "kinematicCloud1",    rho,    U,    g,    slgThermo);
now i get this link error.

HTML Code:
/lib//libbasicThermoKinematicCollidingParcel.so: undefined reference to `Foam::WallModel<Foam::CollidingCloud<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > > >::dictionaryConstructorTablePtr_'/lib//libbasicThermoKinematicCollidingParcel.so: undefined reference to `Foam::PairModel<Foam::CollidingCloud<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > > >::dictionaryConstructorTablePtr_'collect2: ld returned 1 exit status
Could any body help to figure out this error?

Thanks

Hey!
i want to couple basic thermo parcel with kinematic parcel. Can you help regarding this?
SUDHA_PAL is offline   Reply With Quote

Old   July 7, 2022, 11:23
Default
  #13
New Member
 
Emad S
Join Date: Dec 2021
Posts: 14
Rep Power: 4
emadsiadati is on a distinguished road
Did you find your answer?
emadsiadati 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
How creating new thermo physical model weiste01 OpenFOAM Programming & Development 11 May 8, 2020 15:08
problem with Min/max rho tH3f0rC3 OpenFOAM 8 July 31, 2019 09:48
Help with chtMultiRegionFoam jbvw96 OpenFOAM Running, Solving & CFD 2 December 26, 2010 17:16
dieselFoam: how to implement thermo for liquid/gas continuous phase natrask OpenFOAM Running, Solving & CFD 1 July 16, 2009 05:37
How to adding source in UDF? Sam Liu FLUENT 1 November 1, 2005 23:59


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