|
[Sponsors] |
implementation of dynamicRefineFvMesh with solidBodyMotionFunction |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 13, 2018, 11:07 |
implementation of dynamicRefineFvMesh with solidBodyMotionFunction
|
#1 |
New Member
SSSSS
Join Date: Jun 2011
Posts: 28
Rep Power: 14 |
Recently, I have made a class which implment dynamicRefineFvMesh with solidBodyMotionFunction in order to run sloshTank3D6DoF case.
most idea was got from solidBodyMotionFvMesh which was there up to OF 4.x but not in OF 5.x. the new class is derived from dynamicRefineFvMesh so the only implementation is just update() virtual function as follows: class dynamicMotionRefineFvMesh : public dynamicRefineFvMesh { const IOdictionary SBMFCoeffs_; autoPtr<solidBodyMotionFunction> SBMFPtr_; pointIOField undisplacedPoints_; ... } bool Foam::dynamicMotionRefineFvMesh::update() { Foam::dynamicRefineFvMesh::update(); // get the updated point list undisplacedPoints_ = this ->points(); fvMesh::movePoints ( transformPoints ( SBMFPtr_().transformation(), undisplacedPoints_ ) ); // update boundary conditions if (foundObject<volVectorField>("U")) { lookupObjectRef<volVectorField>("U").correctBounda ryConditions(); } return true; } The tutorial case, sloshTank3D6DoF case look running good at first but after Time = 0.02, the simulation could not go further because time step get smaller to infinitesimal due to adjustable time step. The following is parameter used in const/dynamicMeshDict. Except the part related to dynamicRefineFvMesh, all the setup goes well with dynamicMotionSolverFvMesh with solidBodyMotionFunction. solidBodyMotionFunction tabulated6DoFMotion; CofG (0 0 0); timeDataFileName "constant/6DoF.dat"; // How often to refine refineInterval 1; // Field to be refinement on field alpha.water; // Refine field inbetween lower..upper lowerRefineLevel 0.001; upperRefineLevel 0.999; // If value < unrefineLevel unrefine unrefineLevel 10; // Have slower than 2:1 refinement nBufferLayers 1; // Refine cells only up to maxRefinement levels maxRefinement 2; // Stop refinement if maxCells reached maxCells 200000; // Flux field and corresponding velocity field. Fluxes on changed // faces get recalculated by interpolating the velocity. Use 'none' // on surfaceScalarFields that do not need to be reinterpolated. correctFluxes ( (phi none) (nHatf none) (rhoPhi none) (alphaPhi none) (alphaPhi10 none) (ghf none) ); // Write the refinement level as a volScalarField dumpLevel true; Anybody can tell me what is the problem in my implementation? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Free CFD code with implementation of Menter's k-omega SST model | nikola_m | Main CFD Forum | 2 | May 8, 2020 12:13 |
Issues in FGM combustion model implementation | Lisandro Maders | OpenFOAM Programming & Development | 15 | April 22, 2020 19:18 |
a little confused with the implementation of compressibleInterFoam | su_junwei | OpenFOAM Running, Solving & CFD | 2 | May 7, 2014 17:33 |
Implementation issues of fvSchemes / laplacianScheme, in particular gaussLaplacianSch | thomek | OpenFOAM Programming & Development | 0 | October 18, 2010 05:10 |
Please explain the implementation of species transport Eqn in reactingFoam | kallipygian | OpenFOAM Running, Solving & CFD | 0 | October 13, 2008 07:29 |