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

interpolationCellPoint not working in parallel

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 16, 2017, 23:54
Default interpolationCellPoint not working in parallel
  #1
Member
 
Vishwesh Ravi Shrimali
Join Date: Aug 2017
Posts: 43
Rep Power: 8
vishwesh is on a distinguished road
I was following the work done by Aurelia on VOF and LPT conversion and in the move function described in the solidParticleCloud.C file, the interpolationCellPoint function is not working in parallel. It doesn't give any error but just doesn't proceed after that and gets stuck there. But when I try to run the code in serial, it works just fine. Can anyone help me out in finding a solution for this?

The move function:

Code:
void Foam::solidParticleCloud::move(const dimensionedVector& g, bool INJECT, vector posP, vector UP, scalar dP)
{
    Info<<"Function called"<<endl;
    const volScalarField& rho = mesh_.lookupObject<const volScalarField>("rho");
    Info<<"rho: "<<rho<<endl;
    const volVectorField& U = mesh_.lookupObject<const volVectorField>("U");
    const volScalarField& nu = mesh_.lookupObject<const volScalarField>("nu");
    const volScalarField& alphaW = mesh_.lookupObject<const volScalarField>("alpha.water");
    const volScalarField& p = mesh_.lookupObject<const volScalarField>("p");

    Info<<"lookup object worked"<<endl;

    Info<<"rho interpolation"<<endl;
    interpolationCellPoint<scalar> rhoInterp(rho);
//    Info<<"rho: "<<rhoInterp<<endl;
    Info<<"U interpolation"<<endl;
    interpolationCellPoint<vector> UInterp(U);
//    Info<<"U: "<<UInterp<<endl;
    Info<<"nu interpolation"<<endl;
    interpolationCellPoint<scalar> nuInterp(nu);
//    Info<<"nu: "<<nuInterp<<endl;
    Info<<"alpha.water interpolation"<<endl;
    interpolationCell<scalar> alphaWInterp(alphaW);
//    Info<<"alpha: "<<alphaWInterp<<endl;
    Info<<"p interpolation"<<endl;
    interpolationCellPoint<scalar> pInterp(p);
//    Info<<"p: "<<pInterp<<endl;

    Info<<"Interpolation complete"<<endl;

    smom_ = vector::zero;
    correctalphaW_=0;
    correctU_=vector::zero;

    Info<<"smom part complete"<<endl;
    solidParticle::trackingData
        td(*this, rhoInterp, UInterp, nuInterp, alphaWInterp, pInterp, g.value());
//      solidParticle::trackingData
//        td(*this,rho,U,nu,alphaW,p,g.value());
    Info<<"td initialized"<<endl;
    Info<<"Second move called"<<endl;
    Cloud<solidParticle>::move(td, mesh_.time().deltaTValue());
    Info<<"Second move completed"<<endl;
    // Inject
    if (INJECT){
    //    if(mesh_.time().value()> td.cloud().tInjStart_ && mesh_.time().value()< td.cloud().tInjEnd_)
      //  {
            Info<<"Injection called"<<endl;
            this->inject(td,posP,UP,dP);
       // }
    }
}
Result:

Code:
Function called
rho: dimensions      [1 -3 0 0 0 0 0];

internalField   uniform 1;

boundaryField
{
    inlet
    {
        type            symmetry;
    }
    outlet
    {
        type            symmetry;
    }
    walls
    {
        type            symmetry;
    }
    procBoundary0to1
    {
        type            processor;
        value           uniform 1;
    }
    procBoundary0to8
    {
        type            processor;
        value           uniform 1;
    }
    procBoundary0to16
    {
        type            processor;
        value           uniform 1;
    }
    procBoundary0to17
    {
        type            processor;
        value           uniform 1;
    }
    procBoundary0to24
    {
        type            processor;
        value           uniform 1;
    }
    procBoundary0to25
    {
        type            processor;
        value           uniform 1;
    }
}

lookup object worked
rho interpolation
Also, when I try to replace interpolationCellPoint with interpolationCell, it throws an error.

Thanks in advance
vishwesh is offline   Reply With Quote

Old   November 17, 2017, 02:46
Default
  #2
Member
 
Vishwesh Ravi Shrimali
Join Date: Aug 2017
Posts: 43
Rep Power: 8
vishwesh is on a distinguished road
I couldn't resolve the interpolationCellPoint part but I revised them to interpolationCell in header files and the main C file and now it's working fine. Though I would grateful if someone could help me out with the interpolationCellPoint part.
vishwesh 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
[mesh manipulation] Dynamic remeshing (mequite) in parallel not working [foam-extend-4.0] Peter_600 OpenFOAM Meshing & Mesh Conversion 4 August 1, 2017 06:07
[snappyHexMesh] Error while running SnappyHex in parallel mg.mithun OpenFOAM Meshing & Mesh Conversion 1 February 10, 2016 13:13
Explicitly filtered LES saeedi Main CFD Forum 16 October 14, 2015 11:58
parallel finally working hedley SU2 Installation 0 June 23, 2014 11:35
parallel fluent under pbs not working kharnabnew FLUENT 0 January 6, 2011 03:28


All times are GMT -4. The time now is 22:03.