CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

LPT visualization issue

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 13, 2017, 18:40
Question LPT visualization issue
  #1
New Member
 
Matthias
Join Date: Jan 2017
Location: Austria
Posts: 1
Rep Power: 0
MensaFoam is on a distinguished road
Hello all,

We (two students) try to combine SolidParticle with a simple incompressible solver. We also inserted an injection method by following the tutorial of Anton Persson (Chalmers) http://www.tfd.chalmers.se/~hani/kur...tonPersson.pdf
Complilation and simulation seems to be successful (no errors). Although we had some problems to define the arguments for creating the new particle.

Our Problem now:
Its seems to simulate successfully (increasing calculationtime for each time step, caused by more particles in the domain), but we can't visualize the injected particles, only particles which are predefined in "0"-Folder can be seen.

Our code:
part of injectSolidParticleCloud class:
Code:
void Foam::injectSolidParticleCloud::move(const dimensionedVector& g)
{
    // Injector 1
    //Set injection position (z=0 if 2d)
    scalar posy=9e-2;
    scalar posz=0.05;
    scalar posx=1e-2;
    vector pos = vector(posx,posy,posz);
    //Set initial velocity vector
    vector vel=vector(0,0,0);
    //Particle diameter
    scalar d = 2.0e-3;
    // Find cell at specified injection position and add particle here
    label cellI=mesh_.findCell(pos);
    mesh_.findCellFacePt(pos, cellI, 1, 1);
    solidParticle* ptr= new solidParticle
            (
                mesh_,        //const polyMesh& mesh,
                pos,        //const vector& position,
                cellI,        //const label celli,
                1,        //const label tetFacei,
                1,        //const label tetPtI,
                d,        //const scalar d,
                vel        //const vector& U
            );
    Cloud<injectorSolidParticle>::addParticle(ptr);


    const volScalarField& rho = mesh_.lookupObject<const volScalarField>("rho");
    const volVectorField& U = mesh_.lookupObject<const volVectorField>("U");
    const volScalarField& nu = mesh_.lookupObject<const volScalarField>("nu");

    interpolationCellPoint<scalar> rhoInterp(rho);
    interpolationCellPoint<vector> UInterp(U);
    interpolationCellPoint<scalar> nuInterp(nu);

    solidParticle::trackingData
        td(*this, rhoInterp, UInterp, nuInterp, g.value());

    Cloud<solidParticle>::move(td, mesh_.time().deltaTValue());
}
Thanks a lot in advance!
MensaFoam is offline   Reply With Quote

Old   November 3, 2017, 03:28
Default
  #2
Member
 
Vishwesh Ravi Shrimali
Join Date: Aug 2017
Posts: 43
Rep Power: 7
vishwesh is on a distinguished road
Quote:
Originally Posted by MensaFoam View Post
Hello all,

We (two students) try to combine SolidParticle with a simple incompressible solver. We also inserted an injection method by following the tutorial of Anton Persson (Chalmers) http://www.tfd.chalmers.se/~hani/kur...tonPersson.pdf
Complilation and simulation seems to be successful (no errors). Although we had some problems to define the arguments for creating the new particle.

Our Problem now:
Its seems to simulate successfully (increasing calculationtime for each time step, caused by more particles in the domain), but we can't visualize the injected particles, only particles which are predefined in "0"-Folder can be seen.

Our code:
part of injectSolidParticleCloud class:
Code:
void Foam::injectSolidParticleCloud::move(const dimensionedVector& g)
{
    // Injector 1
    //Set injection position (z=0 if 2d)
    scalar posy=9e-2;
    scalar posz=0.05;
    scalar posx=1e-2;
    vector pos = vector(posx,posy,posz);
    //Set initial velocity vector
    vector vel=vector(0,0,0);
    //Particle diameter
    scalar d = 2.0e-3;
    // Find cell at specified injection position and add particle here
    label cellI=mesh_.findCell(pos);
    mesh_.findCellFacePt(pos, cellI, 1, 1);
    solidParticle* ptr= new solidParticle
            (
                mesh_,        //const polyMesh& mesh,
                pos,        //const vector& position,
                cellI,        //const label celli,
                1,        //const label tetFacei,
                1,        //const label tetPtI,
                d,        //const scalar d,
                vel        //const vector& U
            );
    Cloud<injectorSolidParticle>::addParticle(ptr);


    const volScalarField& rho = mesh_.lookupObject<const volScalarField>("rho");
    const volVectorField& U = mesh_.lookupObject<const volVectorField>("U");
    const volScalarField& nu = mesh_.lookupObject<const volScalarField>("nu");

    interpolationCellPoint<scalar> rhoInterp(rho);
    interpolationCellPoint<vector> UInterp(U);
    interpolationCellPoint<scalar> nuInterp(nu);

    solidParticle::trackingData
        td(*this, rhoInterp, UInterp, nuInterp, g.value());

    Cloud<solidParticle>::move(td, mesh_.time().deltaTValue());
}
Thanks a lot in advance!

Hi!
I am also having similar problem. Did you find any solution yet?
vishwesh is offline   Reply With Quote

Reply

Tags
injector model, lpt, solidparticle

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Convergence issue in natural convection problem chrisf90 FLUENT 5 March 5, 2016 09:30
ANSYS Static Structural Visualization Issue raunakbardia Structural Mechanics 1 October 11, 2015 04:10
Strange issue while launching ANSYS workbench in CentOS 6.4 Philip_C ANSYS 11 August 29, 2013 07:44
CyclicAMI Issue In OpenFOAM 2.2.0 prasant OpenFOAM Running, Solving & CFD 17 March 16, 2013 03:00
Meshing related issue in Flow EFD appu FloEFD, FloWorks & FloTHERM 1 May 22, 2011 09:27


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