Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of...

35
Unione Europea Repubblica Italiana Regione Autonoma della Sardegna Re-meshing strategies in CFD simulations of moving meshes MANUELA PROFIR [email protected] August 16, 2012 M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 1 / 34

Transcript of Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of...

Page 1: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

Unione Europea Repubblica Italiana Regione Autonoma della Sardegna

Re-meshing strategies inCFD simulations of moving meshes

MANUELA [email protected]

August 16, 2012

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 1 / 34

Page 2: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

Approach to Mesh Morphing in CFD framework

Morphing in Computer Graphicsgradually changes a source shape into a target shapemedical imaging, scientific visualization, special effects in movies

Volume mesh = mathematical description of the geometry:vertices, faces, cellsSurface deformations in moving fluids/solids simulations: warped,self-intersected faces lead to negative volume cells

Research’s objectivescontrol mesh deformationsdevelop re-meshing strategiesuse Java programming for automation

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 2 / 34

Page 3: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

Research work-flow

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 3 / 34

Page 4: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

Implementation code: CD-adapco’s Star-ccm+

Tools and Novel Concepts

Numerical algorithms: Cell-based discretization(arbitrary polyhedra), AMG solver, ConvergencePhysical models: Motions (Rigid, Morphing, Soliddisplacement), Turbulence, Solid StressFlexible mesh manipulation

Multi-physics, continuum-based modellingSeparation of physics, geometry and meshGeneralized interfaces

3D-CAD modeller - design parametersClient-Server Architecture - Java Scripting

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 4 / 34

Page 5: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

Mesh Morphing procedure in Star-ccm+

Morphing Motion model (deforming mesh) −→ Mesh MorpherMorpher collects control points and specified displacements fromboundaries −→ morpher boundary conditions:

Displacement, Grid Velocity, Solid Stress, Floating.

Control points xi and displacements d(xi) are used to generate aninterpolation field:

d(xi) =n

∑j=1

λj

√‖xi− xj‖2 + c2

j +α,n

∑j=1

λj = 0 ⇒ λj,α

The interpolation field applies to all the mesh vertices:

d(x) =n

∑j=1

λj

√‖x− xj‖2 + c2

j +α

Final adjustments to mesh vertices on or near boundaries.

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 5 / 34

Page 6: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

Morpher boundary conditions

Displacement

δr =

{0.00625xz, xz < 30.00625(6− xz), xz ≥ 3

Grid Velocity

vr =

{−0.003xz, xz < 3−0.003(6− xz), xz ≥ 3

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 6 / 34

Page 7: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

Morpher boundary conditions: Solid Stress in FSI

Pipe deformation/oscillationMorphing: fluid mesh deforms under external loadSolid displacement: body load applied to the solid pipe

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 7 / 34

Page 8: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

Morpher Boundary Conditions: Solid Stress in FSI

Imposed solid displacement

δ (t) = [0.0,((0 < z < l)?(2sin t sin2(zlπ)) : 0),0.0]

Pipe/water system Cells Solid stress ImposedStructured-trimmed 30 K δy = 0.2mm δy = 1cmUnstructured-poly 15 K δy = 0.15mm δy = 0.5cm

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 8 / 34

Page 9: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

Morphing and rigid motions

"Piston" subject to a periodical translation motionBehaviour of surrounding fluid mesh when the piston is moving?Keep under control the expected deformations of the fluid mesh!

δy = 0.01sin t sin2(zlπ), 0≤ z≤ l

vz(t) = Aω sin(ωt)

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 9 / 34

Page 10: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

Bad mesh deformations - Negative volume cells

Large motions determine cells degeneracy! Re-mesh needed!

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 10 / 34

Page 11: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

Mesh quality metrics: Face Validity

Face normals must point away from cell centroid.Perfect cells: FV = 1. Minimum acceptable value: FV = 0.51.Face Validity metric description (reprinted from User Guide [2]):

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 11 / 34

Page 12: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

Negative volume cell with low face validity

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 12 / 34

Page 13: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

Re-meshing strategy: surface mesh extraction

Problems arising: Non-planar faces loose feature curves!Geometry is not preserved!

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 13 / 34

Page 14: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

Re-meshing strategy: surface mesh extraction

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 14 / 34

Page 15: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

Re-meshing strategy: update CAD geometry

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 15 / 34

Page 16: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

Re-meshing strategy: CAD geometry update

Automation of re-meshing with external loops in a Java macro:

1. Run the simulation for one time step.2. Control the condition about the mesh quality criterion.3. If the criterion is satisfied, take one time step forward; otherwise:4. Regenerate the volume mesh, including:

I. prepare a report measuring the exact performed displacement;II. in the CAD construction, apply a translation to the piston body and

expose as design parameter the translation vector;III. the macro reads the displacement’s value and assigns it to the

translation vector, updating the initial position of the piston;IV. regenerate the surface and volume meshes, taking the most recent

boundaries as starting point (i.e. the updated piston position).

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 16 / 34

Page 17: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

Mesh quality metrics: Cell Quality

Depends on the relative geometric distribution of the centroids ofcells neighbours of a face and also on the cell faces orientationPerfect cells: CQ = 1.0. Degenerate cells: CQ = 0.Cell Quality metric description (reprinted from User Guide [2]):

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 17 / 34

Page 18: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

Translational periodical motion

Grid Velocity for Morphing motion

v(t) = Aω sin(ωt)

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 18 / 34

Page 19: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

Improved strategy: optimised re-meshing

Divide domain into three regions, by subtraction, intersection andimprinting boolean operationsCentral region: Translation motionLateral regions: Morphing motionMBC: Floating for Wall boundaries, Grid Velocity for interfacesUpdate geometry for re-meshingRe-mesh only lateral regions

faster meshgenerationless re-meshing

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 19 / 34

Page 20: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

Update lateral bodies through translations

Translate lateralbodies:∆z = p1−p0

p0 = Init.Positionp1 = Max.Position ofcentral region

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 20 / 34

Page 21: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

Extrusion distances: design parameters for up-dating

Central body: 2-way asymmetric extrusion distances

d = d0 +∆z = p1

d′ = d0−∆z = 2p0−p1

Java implementationExtrusionMerge extrusionMerge_0 = ((ExtrusionMerge)cadModel_0.getFeatureManager().getObject("Central"));extrusionMerge_0.getDistance().setValue(d);extrusionMerge_0.getDistanceAsymmetric().setValue(d’)

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 21 / 34

Page 22: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

Update lateral bodies with extrusion distances

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 22 / 34

Page 23: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

Morphing and re-meshing compatibility with physics

Floating - Sliding interfacesGrid Velocity - Interfaces withCentral regionFixed - Interfaces withexternal region

Translation velocity/Grid velocity

v(t) = [0.0,Aπ

2sin(

π

2t +

π

2),0.0],

A 5 ∆z

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 23 / 34

Page 24: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 24 / 34

Page 25: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 25 / 34

Page 26: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 26 / 34

Page 27: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

Re-meshing strategies on complex geometries

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 27 / 34

Page 28: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

Surface extraction strategy on complex geometries

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 28 / 34

Page 29: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 29 / 34

Page 30: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

Update CAD with two design parameters

Implementation in Javadouble d = maxReport_0.getReportMonitorValue();ExtrusionMerge extrusionMerge_0 = ((ExtrusionMerge)cadModel_0.getFeatureManager().getObject("B"));

extrusionMerge_0.getDistance().setValue(d);extrusionMerge_0.getDistanceAsymmetric().setValue(0.34-d);

MoveBodyFeature moveBodyFeature_0 =((MoveBodyFeature) cadModel_0.getFeatureManager().getObject("MoveBody 5"));CadModelCoordinate cadModelCoordinate_0 =moveBodyFeature_0.getTranslationVector();cadModelCoordinate_0.setCoordinate(new DoubleVector(new double[] {0.0, 0.0, d-0.33}));

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 30 / 34

Page 31: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 31 / 34

Page 32: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 32 / 34

Page 33: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

Conclusions and further work

Control of the mesh deformations coherently with the imposeddisplacements.Optimised computation/mesh regeneration time, through aselective (region-wise) re-meshing.Extend the software’s capabilities, by the coupling with Java .Automation of the re-meshing procedures.Regular development of the fluid flow, even in presence ofmorphing and re-meshing operations.Combine sliding interfaces with moving/deforming domains,maintaining or quickly re-creating good quality mesh.

Integration of the moving parts in a larger closed loopCoupling with the physics of nuclear experimental facilitiesReproduce the movement of the control/safety rods system inrelation to applied physical forces (fluid drag, buoyancy, gravity).

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 32 / 34

Page 34: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

Acknowledgments & References

RASThis project is supported by RAS (Regione Autonoma della Sardegna)through a grant co-funded by PO Sardegna FSE 2007-2013,L.R.7/2007 Promozione della ricerca scientifica e dell’innovazionetecnologica in Sardegna.

CRS4Energy & Environment ProgramProcess Engineering and CombustionVincent Moreau

CD-adapco website, http://www.cd-adapco.com/ (Last accessMarch 2012)

USER GUIDE STAR-CCM+ Version 7.02.011.

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 33 / 34

Page 35: Re-meshing strategies in CFD simulations of … · Re-meshing strategies in CFD simulations of moving meshes ... CD-adapco’s Star-ccm+ ... USER GUIDE STAR-CCM+ Version 7.02.011.

ALEXA M. Recent Advances in Mesh Morphing, ComputerGraphics Forum (9/2002).

BOER A., SCHOOT M.S., BIJL H., Mesh morphing based on radialfunction interpolation, Elsevier, 2007.

HARDY, R. L., Theory and applications of the multi-quadricbiharmonic method, Comput. Math. Applic. (1990), Vol. 19, pp.163-208

NEALEN, MULLER, BOXERMAN, CARLSON Physically BasedDeformable Models in Computer Graphics, Eurographics 2005

PROFIR M. M., Mesh morphing implementation methods withexamples, Atti Semin. Mat. Fis. Univ. Modena Reggio Emilia pages141-157 vol. 57, 2010

PROFIR M. M., Automated moving mesh techniques andre-meshing strategies in CFD applications using morphing andrigid motions, CRS4 Technical Report,http://publications.crs4.it/pubdocs/2012/Pro12c.

M. Profir (CRS4) Institute for Nuclear Research, Pitesti, Romania August 16, 2012 34 / 34