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

Cloud::storeGlobalPositions has not been called - How to call it?

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By clapointe
  • 1 Post By mrishi
  • 1 Post By jairoandres

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   July 5, 2019, 07:04
Default Cloud::storeGlobalPositions has not been called - How to call it?
  #1
Member
 
Rishikesh
Join Date: Apr 2016
Posts: 63
Rep Power: 10
mrishi is on a distinguished road
I am trying to implement a coupled Lagrangian-interFoam solver in OF-6 where I want to refine the mesh in two-phase interface region using the dynamicFvRefineMesh option.

However, I encounter the following fatal error as soon as the refinement is done before first timestep.

Code:
--> FOAM FATAL ERROR:
Global positions are not available. Cloud::storeGlobalPositions has not been called.

    From function void Foam::Cloud<ParticleType>::autoMap(const Foam::mapPolyMesh&) [with ParticleType = Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> >]
    in file /opt/openfoam6/src/lagrangian/basic/lnInclude/Cloud.C at line 349.

FOAM exiting
I tried to add the following lines to my solver loop:
Code:
          if (pimple.turbCorr())
            {
                turbulence->correct();
            }
        }

        Info<< "Evolving "<< kinematicCloud.name() <<endl;
        kinematicCloud.evolve();
        kinematicCloud.storeGlobalPositions();
        runTime.write();

        Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
            << "  ClockTime = " << runTime.elapsedClockTime() << " s"
            << nl << endl;
The code compiles but the same problem persists.
The function storeGlobalPositions() is defined in Cloud.H, which is referenced by basicKinematicCollidingCloud.H. If I try to call it like this:
Code:
 Cloud::storeGlobalPositions();
The compiler throws an error that
Code:
interFlow.C:161:2: error: ‘template<class ParticleType> class Foam::Cloud’ used without template parameters
   Cloud::storeGlobalPositions();
I am new to the concept of templates so could someone help me understand and formulate the correct way to call the above function? The kinematicCloud object itself is defined like this in createFields.H:


Code:
//Initialize basicKinematicCollidingCloud

const word kinematicCloudName
(
    args.optionLookupOrDefault<word>("cloudName", "kinematicCloud")
);
Info<< "Constructing kinematic cloud "<< kinematicCloudName <<endl;

basicKinematicCollidingCloud kinematicCloud
(
    kinematicCloudName,
    rho,
    U,
    mu,
    g
);
Thanks for taking time to read this.

Last edited by mrishi; July 5, 2019 at 10:02.
mrishi is offline   Reply With Quote

 


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
Any experts on FFTW? jinhua2015 Main CFD Forum 3 May 22, 2022 19:44
Compiling User Fortran with CFX 14.0 on Win64 Raijin Thunderkeg CFX 29 March 9, 2016 11:45
writing link between two CGNS files t.teschner Main CFD Forum 1 February 4, 2014 10:26
reconstructParMesh not working with an axisymetric case francesco OpenFOAM Bugs 4 May 8, 2009 05:49
2D CFD code using SIMPLE algorithm bfan Main CFD Forum 3 June 22, 2002 22:01


All times are GMT -4. The time now is 20:27.