CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Adding Thermo to basicKinematicCollidingCloud (http://www.cfd-online.com/Forums/openfoam-programming-development/92928-adding-thermo-basickinematiccollidingcloud.html)

bruce September 29, 2011 09:14

Adding Thermo to basicKinematicCollidingCloud
 
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

MPJ April 28, 2012 09:41

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

bruce April 28, 2012 12:55

1 Attachment(s)
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

MPJ April 29, 2012 05:57

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

alquimista May 8, 2013 10:43

Thank you very much. The trick is in :

Code:

collidingCoalCombustion/coalParcel/makeCoalParcelSubmodelsAdded.C
with:

Code:

        typedef coalCloud::collidingCloudType collidingParcelType;
    makeParcelCollisionModels(collidingParcelType);


cmigueis August 18, 2015 10:47

How to use collidingCoalCloud
 
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!


All times are GMT -4. The time now is 05:30.