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

undefined reference to Foam::WallModel

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By ZhangPikai

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 24, 2020, 19:46
Default undefined reference to Foam::WallModel
  #1
Member
 
Join Date: Aug 2017
Posts: 32
Rep Power: 9
siefer92 is on a distinguished road
Howdy everybody!

I've been working on combining ThermoCloud, CollidingCloud and KinematicCloud functionality into a single lagragian solver for OFV2006 and I am having an issue that has been reported in previous threads.

Adding Thermo to basicKinematicCollidingCloud

adding collision to ThermoParcel

Unfortunately, the solutions provided in those threads doesn't seem to be working for this case.

Switching the order of the custom cloud inheritance:

[Thermo,Colliding,Kinematic -> Colliding,Thermo,Kinematic]

didn't fix the issue. Nor did adding the following lines:

typedef basicThermoKinematicCollidingParcelSubmodels::coll idingCloudType collidingParcelType;

makeParcelCollisionModels(collidingParcelType);

to the File:

parcels/derived/basicThermoKinematicCollidingParcel/makeBasicThermoKinematicCollidingParcelSubmodels.C



To be more specific here is the error I am getting when I am trying to link the library to the my code: sonicLPTTFoam


Code:
    -L/home/john/OpenFOAM/john-v2006/platforms/linux64GccDPInt32Opt/lib -lSonicLPTTLagrangianIntermediate -lSonicLPTTlagrangianTurbulence -lSonicLPTTLagrangianSpray -lfiniteVolume -lfvOptions -lmeshTools -lsampling -lcompressibleTransportModels -lfluidThermophysicalModels -lspecie -lturbulenceModels -lcompressibleTurbulenceModels -lOpenFOAM -ldl  \
     -lm -o /home/john/OpenFOAM/john-v2006/platforms/linux64GccDPInt32Opt/bin/sonicLPTTFoam
/home/john/OpenFOAM/john-v2006/platforms/linux64GccDPInt32Opt/lib/libSonicLPTTLagrangianIntermediate.so: undefined reference to `Foam::PairModel<Foam::CollidingCloud<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > > >::dictionaryConstructorTablePtr_'
/home/john/OpenFOAM/john-v2006/platforms/linux64GccDPInt32Opt/lib/libSonicLPTTLagrangianIntermediate.so: undefined reference to `Foam::WallModel<Foam::CollidingCloud<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > > >::dictionaryConstructorTablePtr_'
collect2: error: ld returned 1 exit status
/opt/OpenFOAM/OpenFOAM-v2006/wmake/makefiles/general:148: recipe for target '/home/john/OpenFOAM/john-v2006/platforms/linux64GccDPInt32Opt/bin/sonicLPTTFoam' failed
make: *** [/home/john/OpenFOAM/john-v2006/platforms/linux64GccDPInt32Opt/bin/sonicLPTTFoam] Error 1

The library compiles, as was mentioned in the other threads, but fails to link.

I am attaching my "lagrangian/intermediate/*" source code additions below:

makeBasicThermoKinematicCollidingParcelSubmodels.C
Code:
#include "basicThermoKinematicCollidingCloud.H"

#include "makeParcelCloudFunctionObjects.H"

// Kinematic
#include "makeThermoParcelForces.H"
//#include "makeParcelForces.H"
#include "makeParcelDispersionModels.H"
#include "makeParcelInjectionModels.H"
#include "makeParcelCollisionModels.H"
#include "makeParcelPatchInteractionModels.H"
#include "makeParcelStochasticCollisionModels.H"
#include "makeParcelSurfaceFilmModels.H"

// Thermodynamic
#include "makeParcelHeatTransferModels.H"


makeParcelCloudFunctionObjects(basicThermoKinematicCollidingCloud);

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

makeParcelCollisionModels(basicThermoKinematicCollidingCloud);

//        typedef basicThermoKinematicCollidingCloud::collidingCloudType collidingParcelType;
//    makeParcelCollisionModels(collidingParcelType);

makeParcelPatchInteractionModels(basicThermoKinematicCollidingCloud);
makeParcelStochasticCollisionModels(basicThermoKinematicCollidingCloud);
makeParcelSurfaceFilmModels(basicThermoKinematicCollidingCloud);



makeParcelHeatTransferModels(basicThermoKinematicCollidingCloud);
basicThermoKinematicCollidingParcel.H
Code:
#ifndef basicThermoKinematicCollidingParcel_H
#define basicThermoKinematicCollidingParcel_H

#include "contiguous.H"
#include "particle.H"
#include "ThermoParcel.H"
#include "KinematicParcel.H"
#include "CollidingParcel.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

namespace Foam
{
    typedef ThermoParcel<CollidingParcel<KinematicParcel<particle>>>
        basicThermoKinematicCollidingParcel;

//- Contiguous data for basicThermoParcel

template<> struct is_contiguous<basicThermoKinematicCollidingParcel> : std::true_type {};

}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

#endif
defineBasicThermoKinematicCollidingParcel.C
Code:
#include "basicThermoKinematicCollidingParcel.H"
#include "Cloud.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

namespace Foam
{
    defineTemplateTypeNameAndDebug(basicThermoKinematicCollidingParcel, 0);
    defineTemplateTypeNameAndDebug(Cloud<basicThermoKinematicCollidingParcel>, 0);

//typedef Foam::ThermoParcel<CollidingParcel<KinematicParcel<particle> > > thermoParcel;
//defineTemplateTypeNameAndDebug(thermoParcel, 0);

}

basicThermoKinematicCollidingCloud.H
Code:
#ifndef basicThermoKinematicCollidingCloud_H
#define basicThermoKinematicCollidingCloud_H

#include "Cloud.H"
#include "ThermoCloud.H"
#include "KinematicCloud.H"
#include "CollidingCloud.H"
#include "basicThermoKinematicCollidingParcel.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

namespace Foam
{
    typedef ThermoCloud<CollidingCloud<KinematicCloud<Cloud<    
                basicThermoKinematicCollidingParcel
            >>>>basicThermoKinematicCollidingCloud;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

#endif
Added the following lines to Make/files of the intermediate directory

Code:
/* ThermoKinematicColliding parcel sub-models */

parcels/derived/basicThermoKinematicCollidingParcel/defineBasicThermoKinematicCollidingParcel.C
parcels/derived/basicThermoKinematicCollidingParcel/makeBasicThermoKinematicCollidingParcelSubmodels.C
The code sonicLPTTFOAM.C is attached below

Code:
#include "fvCFD.H"
#include "SLGThermo.H"
#include "psiThermo.H"
#include "turbulentFluidThermoModel.H"
#include "pimpleControl.H"
#include "fvOptions.H"
//#include "basicThermoCloud.H"
#include "basicThermoKinematicCollidingCloud.H"
#include "radiationModel.H"
#include "pressureControl.H"
#include "localEulerDdtScheme.H"
#include "fvcSmooth.H"
//#include "compressibleCourantNo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

int main(int argc, char *argv[])
{
    argList::addNote
    (
        "Transient solver for trans-sonic/supersonic, turbulent flow"
        " of a compressible gas."
    );

    #include "postProcess.H"

    #include "addCheckCaseOptions.H"
    #include "setRootCaseLists.H"
    #include "createTime.H"
    #include "createMesh.H"
    #include "createTimeControls.H"
//    #include "readGravitationalAcceleration.H"
    #include "createControl.H"
    #include "createFields.H"
    #include "createFieldRefs.H"
    #include "initContinuityErrs.H"
    turbulence->validate();

    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

    Info<< "\nStarting time loop\n" << endl;
    int STRM;
    int remeshes;
    int Total_Timestep;
    

    bool deformingMesh =
    runTime.controlDict().getOrDefault("deformingMesh", false);


//    const word& remeshControl =
//    runTime.controlDict().getOrDefault("remeshControl", "timeStep");

    
    int remeshTSFreq =
    runTime.controlDict().getOrDefault("remeshTSFreq", 100);

   


    double remeshErosionLinearDepth =
    runTime.controlDict().getOrDefault("remeshErosionLinearDepth", .0001);


    Total_Timestep = 0;
    STRM = 10;
    while (runTime.run())
    {
        Info<< "Time = " << runTime.timeName() << nl << endl;

	#include "compressibleCourantNo.H"

        #include "readTimeControls.H" 
        #include "setDeltaT.H" 
        runTime++;

        #include "rhoEqn.H"

        // --- Pressure-velocity PIMPLE corrector loop
        while (pimple.loop())
        {
            #include "UEqn.H"
            #include "EEqn.H"

            // --- Pressure corrector loop
            while (pimple.correct())
            {
                #include "pEqn.H"
            }

            if (pimple.turbCorr())
            {
                turbulence->correct();
            }
        }

        rho = thermo.rho();

	Info << "\nEvolving " << dustParcels.name() << endl;
//	Info << "\nDid OpenFOAM Fucking Freeze Again?" << endl;
	dustParcels.evolve();

        if(STRM<1)
        {
        STRM=10;
        remeshes += 1;
        }
	Total_Timestep += 1;
        STRM = STRM-1;

	Info << "\nTimestep Number:		" << Total_Timestep  << endl;
        Info << "Timesteps Until Remesh:		" << STRM  << endl;
        Info << "Remesh Number:			" << remeshes  << endl;

	Info << "\n" << endl;
        Info<< "\nREMESHTSFREQ OUTPUT YAY DICKS" << remeshTSFreq << endl;
//        Info << "\nREMESH_TRIGGER " << remeshControl << endl;
//	Info << "\nNot Yet." << endl;
        runTime.write();

        runTime.printExecutionTime(Info);
    }
    Info<< "End\n" << endl;

    return 0;
}
creatFields.H is also attached:

Code:
#include "readGravitationalAcceleration.H" 

 Info<< "Reading thermophysical properties\n" << endl;
 autoPtr<psiThermo> pThermo(psiThermo::New(mesh));
 psiThermo& thermo = pThermo();
 thermo.validate(args.executable(), "h", "e");
  
 SLGThermo slgThermo(mesh, thermo);

volScalarField& p = thermo.p();
// const volScalarField& T = thermo.T();
// const volScalarField& psi = thermo.psi();

multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
 fields.add(thermo.he());

volScalarField rho
(
    IOobject
    (
        "rho",
        runTime.timeName(),
        mesh
    ),
    thermo.rho()
);

Info<< "Reading field U\n" << endl;
volVectorField U
(
    IOobject
    (
        "U",
        runTime.timeName(),
        mesh,
        IOobject::MUST_READ,
        IOobject::AUTO_WRITE
    ),
    mesh
);

#include "compressibleCreatePhi.H"

mesh.setFluxRequired(p.name());

Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::turbulenceModel> turbulence
(
    compressible::turbulenceModel::New
    (
        rho,
        U,
        phi,
        thermo
    )
);

#include "createK.H"

#include "createMRF.H"

Info<< "Reading transportProperties\n" <<endl;
IOdictionary transportProperties
        (
                IOobject
                (
                        "transportProperties",
                        runTime.constant(),
                        mesh,
                        IOobject::MUST_READ_IF_MODIFIED,
                        IOobject::NO_WRITE
                )
        );
dimensionedScalar rhoInfValue
        (
                transportProperties.lookup("rhoInf")
        );

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

dimensionedScalar invrhoInf("invrhoInf",(1.0/rhoInfValue));

volScalarField rhoInf
        (
                IOobject
                (
                        "rho",
                        runTime.timeName(),
                        mesh,
                        IOobject::NO_READ,
                        IOobject::AUTO_WRITE
                ),
                mesh,
                rhoInfValue
        );




volScalarField mu
        (
                IOobject
                (
                        "mu",
                        runTime.timeName(),
                        mesh,
                        IOobject::NO_READ,
                        IOobject::AUTO_WRITE
                ),
                turbulence->nu()*rhoInfValue
        );


 Info<< "\nConstructing dust cloud" << endl;
 basicThermoKinematicCollidingCloud dustParcels
 (
		"dustCloud",
		rhoInf,
                U,
                g,
		slgThermo

 );



#include "createFvOptions.H"


While playing around with what causes the error I found that by commenting out the models in the makeBasicThermoKinematicCollidingParcelSubmodels.C file I can cause additional linking errors, complaining about undefined references, to appear. The library compiles without issue though.


if anybody has any thoughts as to what might being going on I'd greatly appreciate it.

if needed I can post the rest of the code to aid in troubleshooting.
siefer92 is offline   Reply With Quote

Old   September 24, 2020, 19:47
Default
  #2
Member
 
Join Date: Aug 2017
Posts: 32
Rep Power: 9
siefer92 is on a distinguished road
This is the linking error I get after I have modified the makeSubmodels.C file in the following manner

Code:
#include "basicThermoKinematicCollidingCloud.H"

#include "makeParcelCloudFunctionObjects.H"

// Kinematic
#include "makeThermoParcelForces.H"
//#include "makeParcelForces.H"
#include "makeParcelDispersionModels.H"
#include "makeParcelInjectionModels.H"
#include "makeParcelCollisionModels.H"
#include "makeParcelPatchInteractionModels.H"
#include "makeParcelStochasticCollisionModels.H"
#include "makeParcelSurfaceFilmModels.H"

// Thermodynamic
#include "makeParcelHeatTransferModels.H"


makeParcelCloudFunctionObjects(basicThermoKinematicCollidingCloud);

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

//makeParcelCollisionModels(basicThermoKinematicCollidingCloud);

//        typedef basicThermoKinematicCollidingCloud::collidingCloudType collidingParcelType;
//    makeParcelCollisionModels(collidingParcelType);

//makeParcelPatchInteractionModels(basicThermoKinematicCollidingCloud);
//makeParcelStochasticCollisionModels(basicThermoKinematicCollidingCloud);
//makeParcelSurfaceFilmModels(basicThermoKinematicCollidingCloud);



//makeParcelHeatTransferModels(basicThermoKinematicCollidingCloud);
Had to post as a reply due to character limitations

Code:
     -lm -o /home/john/OpenFOAM/john-v2006/platforms/linux64GccDPInt32Opt/bin/sonicLPTTFoam
Make/linux64GccDPInt32Opt/sonicLPTTFoam.o: In function `Foam::ParticleForce<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > >::type() const':
sonicLPTTFoam.C:(.text._ZNK4Foam13ParticleForceINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEE4typeEv[_ZNK4Foam13ParticleForceINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEE4typeEv]+0x3): undefined reference to `Foam::ParticleForce<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > >::typeName'
Make/linux64GccDPInt32Opt/sonicLPTTFoam.o: In function `Foam::HeatTransferModel<Foam::ThermoCloud<Foam::CollidingCloud<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > > > >::New(Foam::dictionary const&, Foam::ThermoCloud<Foam::CollidingCloud<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > > >&)':
sonicLPTTFoam.C:(.text._ZN4Foam17HeatTransferModelINS_11ThermoCloudINS_14CollidingCloudINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEEEEEE3NewERKNS_10dictionaryERSF_[_ZN4Foam17HeatTransferModelINS_11ThermoCloudINS_14CollidingCloudINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEEEEEE3NewERKNS_10dictionaryERSF_]+0x96): undefined reference to `Foam::HeatTransferModel<Foam::ThermoCloud<Foam::CollidingCloud<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > > > >::dictionaryConstructorTablePtr_'
sonicLPTTFoam.C:(.text._ZN4Foam17HeatTransferModelINS_11ThermoCloudINS_14CollidingCloudINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEEEEEE3NewERKNS_10dictionaryERSF_[_ZN4Foam17HeatTransferModelINS_11ThermoCloudINS_14CollidingCloudINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEEEEEE3NewERKNS_10dictionaryERSF_]+0x134): undefined reference to `Foam::HeatTransferModel<Foam::ThermoCloud<Foam::CollidingCloud<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > > > >::dictionaryConstructorTablePtr_'
Make/linux64GccDPInt32Opt/sonicLPTTFoam.o: In function `Foam::CollisionModel<Foam::CollidingCloud<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > > >::New(Foam::dictionary const&, Foam::CollidingCloud<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > >&)':
sonicLPTTFoam.C:(.text._ZN4Foam14CollisionModelINS_14CollidingCloudINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEEEE3NewERKNS_10dictionaryERSD_[_ZN4Foam14CollisionModelINS_14CollidingCloudINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEEEE3NewERKNS_10dictionaryERSD_]+0x96): undefined reference to `Foam::CollisionModel<Foam::CollidingCloud<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > > >::dictionaryConstructorTablePtr_'
sonicLPTTFoam.C:(.text._ZN4Foam14CollisionModelINS_14CollidingCloudINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEEEE3NewERKNS_10dictionaryERSD_[_ZN4Foam14CollisionModelINS_14CollidingCloudINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEEEE3NewERKNS_10dictionaryERSD_]+0x134): undefined reference to `Foam::CollisionModel<Foam::CollidingCloud<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > > >::dictionaryConstructorTablePtr_'
Make/linux64GccDPInt32Opt/sonicLPTTFoam.o: In function `Foam::ParticleForce<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > >::New(Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > >&, Foam::fvMesh const&, Foam::dictionary const&, Foam::word const&)':
sonicLPTTFoam.C:(.text._ZN4Foam13ParticleForceINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEE3NewERSB_RKNS_6fvMeshERKNS_10dictionaryERKNS_4wordE[_ZN4Foam13ParticleForceINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEE3NewERSB_RKNS_6fvMeshERKNS_10dictionaryERKNS_4wordE]+0x65): undefined reference to `Foam::ParticleForce<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > >::dictionaryConstructorTablePtr_'
sonicLPTTFoam.C:(.text._ZN4Foam13ParticleForceINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEE3NewERSB_RKNS_6fvMeshERKNS_10dictionaryERKNS_4wordE[_ZN4Foam13ParticleForceINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEE3NewERSB_RKNS_6fvMeshERKNS_10dictionaryERKNS_4wordE]+0x106): undefined reference to `Foam::ParticleForce<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > >::dictionaryConstructorTablePtr_'
Make/linux64GccDPInt32Opt/sonicLPTTFoam.o: In function `Foam::InjectionModel<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > >::New(Foam::dictionary const&, Foam::word const&, Foam::word const&, Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > >&)':
sonicLPTTFoam.C:(.text._ZN4Foam14InjectionModelINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEE3NewERKNS_10dictionaryERKNS_4wordESI_RSB_[_ZN4Foam14InjectionModelINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEE3NewERKNS_10dictionaryERKNS_4wordESI_RSB_]+0x65): undefined reference to `Foam::InjectionModel<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > >::dictionaryConstructorTablePtr_'
sonicLPTTFoam.C:(.text._ZN4Foam14InjectionModelINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEE3NewERKNS_10dictionaryERKNS_4wordESI_RSB_[_ZN4Foam14InjectionModelINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEE3NewERKNS_10dictionaryERKNS_4wordESI_RSB_]+0x106): undefined reference to `Foam::InjectionModel<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > >::dictionaryConstructorTablePtr_'
Make/linux64GccDPInt32Opt/sonicLPTTFoam.o: In function `Foam::DispersionModel<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > >::New(Foam::dictionary const&, Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > >&)':
sonicLPTTFoam.C:(.text._ZN4Foam15DispersionModelINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEE3NewERKNS_10dictionaryERSB_[_ZN4Foam15DispersionModelINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEE3NewERKNS_10dictionaryERSB_]+0x96): undefined reference to `Foam::DispersionModel<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > >::dictionaryConstructorTablePtr_'
sonicLPTTFoam.C:(.text._ZN4Foam15DispersionModelINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEE3NewERKNS_10dictionaryERSB_[_ZN4Foam15DispersionModelINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEE3NewERKNS_10dictionaryERSB_]+0x134): undefined reference to `Foam::DispersionModel<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > >::dictionaryConstructorTablePtr_'
Make/linux64GccDPInt32Opt/sonicLPTTFoam.o: In function `Foam::PatchInteractionModel<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > >::New(Foam::dictionary const&, Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > >&)':
sonicLPTTFoam.C:(.text._ZN4Foam21PatchInteractionModelINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEE3NewERKNS_10dictionaryERSB_[_ZN4Foam21PatchInteractionModelINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEE3NewERKNS_10dictionaryERSB_]+0x96): undefined reference to `Foam::PatchInteractionModel<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > >::dictionaryConstructorTablePtr_'
sonicLPTTFoam.C:(.text._ZN4Foam21PatchInteractionModelINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEE3NewERKNS_10dictionaryERSB_[_ZN4Foam21PatchInteractionModelINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEE3NewERKNS_10dictionaryERSB_]+0x134): undefined reference to `Foam::PatchInteractionModel<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > >::dictionaryConstructorTablePtr_'
Make/linux64GccDPInt32Opt/sonicLPTTFoam.o: In function `Foam::StochasticCollisionModel<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > >::New(Foam::dictionary const&, Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > >&)':
sonicLPTTFoam.C:(.text._ZN4Foam24StochasticCollisionModelINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEE3NewERKNS_10dictionaryERSB_[_ZN4Foam24StochasticCollisionModelINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEE3NewERKNS_10dictionaryERSB_]+0x96): undefined reference to `Foam::StochasticCollisionModel<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > >::dictionaryConstructorTablePtr_'
sonicLPTTFoam.C:(.text._ZN4Foam24StochasticCollisionModelINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEE3NewERKNS_10dictionaryERSB_[_ZN4Foam24StochasticCollisionModelINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEE3NewERKNS_10dictionaryERSB_]+0x134): undefined reference to `Foam::StochasticCollisionModel<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > >::dictionaryConstructorTablePtr_'
Make/linux64GccDPInt32Opt/sonicLPTTFoam.o: In function `Foam::SurfaceFilmModel<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > >::New(Foam::dictionary const&, Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > >&)':
sonicLPTTFoam.C:(.text._ZN4Foam16SurfaceFilmModelINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEE3NewERKNS_10dictionaryERSB_[_ZN4Foam16SurfaceFilmModelINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEE3NewERKNS_10dictionaryERSB_]+0x96): undefined reference to `Foam::SurfaceFilmModel<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > >::dictionaryConstructorTablePtr_'
sonicLPTTFoam.C:(.text._ZN4Foam16SurfaceFilmModelINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEE3NewERKNS_10dictionaryERSB_[_ZN4Foam16SurfaceFilmModelINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEE3NewERKNS_10dictionaryERSB_]+0x134): undefined reference to `Foam::SurfaceFilmModel<Foam::KinematicCloud<Foam::Cloud<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > >::dictionaryConstructorTablePtr_'
collect2: error: ld returned 1 exit status
/opt/OpenFOAM/OpenFOAM-v2006/wmake/makefiles/general:148: recipe for target '/home/john/OpenFOAM/john-v2006/platforms/linux64GccDPInt32Opt/bin/sonicLPTTFoam' failed
make: *** [/home/john/OpenFOAM/john-v2006/platforms/linux64GccDPInt32Opt/bin/sonicLPTTFoam] Error 1
siefer92 is offline   Reply With Quote

Old   October 22, 2021, 10:12
Default
  #3
New Member
 
Please select
Join Date: Aug 2021
Posts: 4
Rep Power: 5
ZhangPikai is on a distinguished road
Hello, friend, have you solved the problem?
I ran into exactly the same question as you!
ZhangPikai is offline   Reply With Quote

Old   October 24, 2021, 23:13
Default
  #4
Member
 
Join Date: Aug 2017
Posts: 32
Rep Power: 9
siefer92 is on a distinguished road
Unfortunately not. I've decided, do to a lack of high performance computational resources, to neglect the particle-particle interactions in dense flows.

I've stopped looking at merging the two for my dissertation, but I have been working on additional lagrangian capabilities that aren't currently a part of vanilla OpenFOAM. I've been getting better at coding in OF with each little project so maybe in the future I will take a closer look at uniting the existing lagrangian capability into a unified cloud.

Sorry if this wasn't the answer you were looking for.
siefer92 is offline   Reply With Quote

Old   November 3, 2021, 10:48
Default
  #5
New Member
 
Please select
Join Date: Aug 2021
Posts: 4
Rep Power: 5
ZhangPikai is on a distinguished road
Hello, I find the solution of the above problem.

The key is the "makeParcelCollisionModels.H". we can see makeCollisionModel, makePairModel and makeWallModel should be around the same. The first one has no question, but the latter two meet with "undefined reference to xxx".
when we look into these three .H file (src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/), the collisionModel.H has "typedef xxx collidingCloudType" which does not show in PairModel.H and WallModel.H, so it is needed to specify behind Foam::CloudType. However, directly using the way like collisionModel.H will meet compiling error. Thus, just add "::collidingCloudType" behind all related "Foam::CloudType" positions.

Good luck.
alainislas likes this.
ZhangPikai is offline   Reply With Quote

Reply

Tags
compiling error, lagrangian, sonicfoam, undefined reference to


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
can not complie fluentDataToFoam in OF2.1.1 hewei OpenFOAM Pre-Processing 20 September 8, 2018 10:19
LiencubiclowRemodel nzy102 OpenFOAM Bugs 14 January 10, 2012 09:53
compile error about FJMPI chiven OpenFOAM Installation 11 March 31, 2010 07:27
OF Successfully built? Pytthon OpenFOAM 5 February 20, 2010 07:44
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08


All times are GMT -4. The time now is 04:26.