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

Computation of faces and cells in prescribed dynamic mesh motion

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 31, 2019, 09:28
Default Computation of faces and cells in prescribed dynamic mesh motion
  #1
New Member
 
Thomas
Join Date: Jul 2018
Posts: 16
Rep Power: 7
Roxxor91 is on a distinguished road
In the context of dynamicInkJetFvMesh, the motion of every points is given explicitly, as seen in its implementation of mesh.update:

Code:
bool Foam::dynamicInkJetFvMesh::update()
{
    scalar scalingFunction =
        0.5*
        (
            ::cos(constant::mathematical::twoPi*frequency_*time().value())
          - 1.0
        );

    Info<< "Mesh scaling. Time = " << time().value() << " scaling: "
        << scalingFunction << endl;

    pointField newPoints = stationaryPoints_;

    newPoints.replace
    (
        vector::X,
        stationaryPoints_.component(vector::X)*
        (
            1.0
          + pos0
            (
              - (stationaryPoints_.component(vector::X))
              - refPlaneX_
            )*amplitude_*scalingFunction
        )
    );

    fvMesh::movePoints(newPoints);

    lookupObjectRef<volVectorField>("U").correctBoundaryConditions();

    return true;
}
However, how faces and cells are updated ? More specifically, points are still belonging to the same faces, I can't figure out how face normals and cell volume are updated after point motion.

Moreover, I dont't understand how the method to get "mesh.phi" works. It is defined as

Code:
 const Foam::surfaceScalarField& Foam::fvMesh::phi() const
 {
     if (!phiPtr_)
     {
         FatalErrorInFunction
             << "mesh flux field does not exist, is the mesh actually moving?"
             << abort(FatalError);
     }
  
     // Set zero current time
     // mesh motion fluxes if the time has been incremented
     if (!time().subCycling() && phiPtr_->timeIndex() != time().timeIndex())
     {
         (*phiPtr_) = dimensionedScalar(dimVolume/dimTime, Zero);
     }
  
     phiPtr_->setOriented();
  
     return *phiPtr_;
 }
and it does not look to me that phiPtr_ points tothe desired surfaceScalarField..

Can you help me with that ?
Roxxor91 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
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 92 May 21, 2024 07:56
Decomposing meshes Tobi OpenFOAM Pre-Processing 22 February 24, 2023 09:23
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 18:57
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 09:38
snappyhexmesh remove blockmesh geometry philipp1 OpenFOAM Running, Solving & CFD 2 December 12, 2014 10:58


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