Adaptive Meshing
using STAR-CCM+
Weekly meeting – 05.12.2010
Victor Pépin
Plan
Curriculum
Problem
Software presentation
Solution
Results
Next steps
Curriculum
Student at Ecole Centrale Paris
French engineering school
Non-specialized school
6 months internship in Manchester
• February to mid-July
Problem
How to improve the use of computation
resources over the geometry of the
simulation ?
Particularly, how to share resources
relevantly, depending on the interest
each area of the simulation represents ?
A solution : adaptive meshing
Software presentation
Star-CCM+, v4.04.011 (CD-Adapco)
Allows the use of macros, written in Java
A macro is a list of instructions, forming
an algorithm
It interacts with the software via the user
interface
The software is seen like a “black box”
Example of macro instructions
// Define the simulation as a variable
Simulation simulation_0 = getActiveSimulation();
// Define the Stopping Criterion as a variable
StepStoppingCriterion stepStoppingCriterion_0 =
((StepStoppingCriterion) simulation_0.
getSolverStoppingCriterionManager().
getSolverStoppingCriterion("Maximum Steps"));
// Set the value of the Stopping Criterion to 1000
stepStoppingCriterion_0.setMaximumNumberSteps(1000);
// Run the simulation
simulation_0.getSimulationIterator().run();
Solution Scheme 1/2
Choose a quantity of interest, which will be
the criterion of your refinement: e.g. velocity
Launch the simulation with a coarse mesh
Export a table containing the velocity in each
cell of the mesh
Consider each cell, and compare its velocity
with a reference velocity
• Vref = Vmin + percentage x (Vmax – Vmin)
Solution 2/2
If V > Vref :
• Create a box (Volume Shape), centred on the cell,
•
whose size is approximately the size of the cell
Add the Volume Shape to a Source Volume
Set a smaller base size for the mesh upon the
Source Volume
Re-mesh the simulation
Run the simulation
Repeat the process
Results 1/3
2D lid-driven cavity test case
Re = 50
Steady state of the flow
Results 1/3
Results 2/3
2D turbulent lid-driven cavity
Re = 15 000
Establishing flow
The mesh follows the flow
Results 3/3
3D cylinder
Re = 10
Flow entering the pipe on the left
Other features of the macro
Adapt easily to any case (shape,
boundaries, type of mesh…)
Take user-defined field functions as a
criterion for mesh refinement
• Gradients,
• Convergence between 2 times steps…
Refine the mesh considering several
field functions
Next steps
Measure the gains and loss of accuracy
Measure the benefits in terms of time,
and memory
The end
Thank you for listening !
© Copyright 2026 Paperzz