CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [Other] Dynamic meshing for accretion on structures (https://www.cfd-online.com/Forums/openfoam-meshing/175419-dynamic-meshing-accretion-structures.html)

iy-a July 29, 2016 10:09

Dynamic meshing for accretion on structures
 
Hi,

My aim here is to find a dynamic meshing program that could be used for :

- making the structure vertically rotates as a reaction to the flow
- modifying the mesh along the simulation (here, ice accretion).

I'd like the structure's mass to be computed in the solver's loop aswell.
I think I can tweak the solver enough to simulate Ice accretion but I
am not sure if I can find an appropriate mesher.

Any help/clue would be appreciated.
_iya.

iy-a August 4, 2016 05:01

where to start : pimpleDyMFoam
 
After scouring OF documentation and a few posts on this forum,
I finally came to the conclusion that I could start by using pimpleDyMFoam.
Though, only wingMotion example (2D) seems to show a passive rotation,
whereas the propeller example (3D) features imposed rotation.


So to sum up :
---> 2D airfoil geometry rotating around chosen axis.
---> Turbulence allowed, free stream velocity.
---> Less computation time than 3D examples.

However, I struggle to make this example work with my geometry, for two reasons :
- I am not sure how to generate blockMeshDict and snappyHexMeshDict in this case.
- I can not set dynamicMeshDict manually. Is there a program that automatically do it ?

I have to set a 3D mesh and then run extrudeMesh to make it 2D, along a plane.
But the biggest effort is to find how to set up dynamicMeshDict parameters such as
center of mass, moment of intertia, constraints, ... and especially the springs !

If anybody knows thanks for sharing.
iy-a

iy-a August 4, 2016 11:27

2 Attachment(s)
So I managed to customize wingmotion example to a certain point :

- import the example's NACA wing to blender
- import my own STL and make it fit on the wing for correct sizing
- export my blender file under the same format (.obj), name and location of the inital wing
- launch Allrun command and stop it when running pimpleDyMFoam in parralel.
- run checkMesh command : mesh is fine !!! OK for the meshing (attached pictures).
- Then I go to wingmotion2D_pimpleDyMFoam and run pimpleDyMFoam solver, but an error occurs resulting in a floating point exception (see printed stack here below).

Observations :
- PIMPLE does only 2 iterations and then stops.
- playing with parameters in fvSolution such as tolerance for p or U fields doesn't resolve the problem.
- playing with the time step in controlDict neither.

Does this simulation diverge ?



================================================== ==============
Create time

Create mesh for time = 0

Selecting dynamicFvMesh dynamicMotionSolverFvMesh
Selecting motion solver: sixDoFRigidBodyMotion
Selecting sixDoFSolver symplectic
Translational constraint tensor (0 0 0 0 1 0 0 0 0)
Rotational constraint tensor (0 0 0 0 0 0 0 0 1)

PIMPLE: no residual control data found. Calculations will employ 2 corrector loops

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type RAS
Selecting RAS turbulence model kOmegaSST
Selecting patchDistMethod meshWave
kOmegaSSTCoeffs
{
alphaK1 0.85;
alphaK2 1;
alphaOmega1 0.5;
alphaOmega2 0.856;
gamma1 0.5555555556;
gamma2 0.44;
beta1 0.075;
beta2 0.0828;
betaStar 0.09;
a1 0.31;
b1 1;
c1 10;
F3 false;
}

No MRF models present

Reading/calculating face velocity Uf

No finite volume options present

Courant Number mean: 0.0183622465 max: 0.8816358446

Starting time loop

Courant Number mean: 0.0183622465 max: 0.8816358446
deltaT = 1.020829638e-05
Time = 1.02083e-05

forces forces:
Not including porosity effects
Restraint verticalSpring: attachmentPt - anchor (0 0 0) spring length 0 force (-0 -0 -0)
Restraint axialSpring: angle -5.879787487e-06 moment (0 0 0.2879907426)
6-DoF rigid body motion
Centre of rotation: (0.25 0.007 0.125)
Centre of mass: (0.4974611351 -0.01672041246 0.125)
Orientation: (0.9953700284 0.09611715038 0 -0.09611715038 0.9953700284 0 0 0 1)
Linear velocity: (0 0.003075723962 0)
Angular velocity: (0 0 -0.5704814841)
GAMG: Solving for pcorr, Initial residual = 1, Final residual = 4.328923376e+59, No Iterations 1000
time step continuity errors : sum local = 3.852037694e+55, global = -4.460765735e+53, cumulative = -4.460765735e+53
PIMPLE: iteration 1
smoothSolver: Solving for Ux, Initial residual = 0.7678463147, Final residual = 0.03479628648, No Iterations 2
smoothSolver: Solving for Uy, Initial residual = 0.1748341242, Final residual = 0.006704102236, No Iterations 2
GAMG: Solving for p, Initial residual = 1, Final residual = 0.006702901987, No Iterations 6
time step continuity errors : sum local = 5.569897705e-06, global = 4.366072165e-07, cumulative = -4.460765735e+53
PIMPLE: iteration 2
smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 3.14400686e-08, No Iterations 4
smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 4.389240957e-08, No Iterations 4

#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::DICPreconditioner::calcReciprocalD(Foam::Fie ld<double>&, Foam::lduMatrix const&) at ??:?
#4 Foam::DICPreconditioner::DICPreconditioner(Foam::l duMatrix::solver const&, Foam::dictionary const&) at ??:?
#5 Foam::lduMatrix::preconditioner::addsymMatrixConst ructorToTable<Foam::DICPreconditioner>::New(Foam:: lduMatrix::solver const&, Foam::dictionary const&) at ??:?
#6 Foam::lduMatrix::preconditioner::New(Foam::lduMatr ix::solver const&, Foam::dictionary const&) at ??:?
#7 Foam::PCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
#8 Foam::GAMGSolver::solveCoarsestLevel(Foam::Field<d ouble>&, Foam::Field<double> const&) const at ??:?
#9 Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMa trix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const at ??:?
#10 Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
#11 Foam::fvMatrix<double>::solveSegregated(Foam::dict ionary const&) at ??:?
#12 Foam::fvMatrix<double>::solve(Foam::dictionary const&) at ??:?
#13 ? at ??:?
#14 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#15 ? at ??:?

Floating point exception
iya@i-ya ~/OpenFOAM/iya-4.0/run/tutorials/incompressible/pimpleDyMFoam/savonius/wingMotion2D_pimpleDyMFoam $

iy-a August 5, 2016 06:31

Could anybody run this case ?
 
Ok I really don't get this.

- Courant number is kept in ]0;1[ range
- Adding non/orthogonal correctors doesn't seem to be a solution
- enabling/disabling turbulence neither
- increasing/decreasing initial velocity in 0.orig/include/initialConditions neither
- changing springs stiffness (down to 0) in dynamicMeshDict neither.
- switching adjustabletimestep to "no", neither.

I do not get how DICPreconditionner or GAMG are failing neither why the cumulative time step is sky high.
I recall that from the initial 2D wing example, nothing has changed except the rotating mesh geometry, kept inside the exact same block.
Here I attach my case if anybody could try to run it. (first go into wingmotion2D_pimpleDyMFoam folder and then run pimpleDyMFoam).

https://www.sendspace.com/file/idc6b2

Thank you in advance.

PS : most of dynamicMeshDict properties are kept as before. It shouldn't be a big deal if I didn't change them, right ?

iy-a August 10, 2016 09:20

Ok it seemed that GAMG solver for pressure correction was not appropriated to treat what is happenning in my geometry. So I used smoothSolver and it worked.
I also reduced some tolerances such as the ones for pressure and pressure correction, as well as reducing relative tolerances.

However, skewing of cells occur as my structure spins. At some point (iteration 300th),
these cells became so skewed that they made my mesh unconsistent i.e checkMesh :

***Error in face pyramids: 1 faces are incorrectly oriented.

I thus added nonOrthogonalCorrectors to see what happens.
EDIT : according to this thread, skewing could be avoided using cyclicAMI.
I will edit this post again as soon as I figured out how.


sibo October 12, 2017 14:38

Hi,

I am really interested into your work.
Actually the dynamic mesh can be easily done by modifying the code in corresponding included header files.
But my question is, I can't find the model for ice solidification in openfoam. Do I need to build this model by myself?

Thanks a lot!


All times are GMT -4. The time now is 17:01.