The second Simcenter STAR-CCM+ Macro Competition occurred at the 2016 STAR Global Conference in Prague. That year, the competition was part of the Java Lecture. During such a lecture, a set of macros and a simulation were used. At the end of the lecture, the macro competition started by posing a question related to the simulation to the participants.
This article describes the macros and the simulation used. At the end of the article, the same question that was asked to the participants is posed. The next article in this series will show you one of the possible solutions.
Welcome interns! Company NOEW (Not Only Efficient Wings) welcomes you to its 2nd Summer Internship. You will work within the Wing full-automatic-characterization program. We ask you to review previous internship accomplishments and expand on them. The ultimate goal of this program is to have a quick turnaround time for wing profile assessment. (Where NOEW pool of experimental data for hundredths of different wings will be used). Our first internship program already began this task by creating macros that automatize the initial part of the workflow: from wing profile to simulation.
Let us see how this workflow works: NACA Workflow
As you see, the macro allows you to select a given NACA profile from one of your folders.
And automatically sets up a 2D simulation with basic post-processing.
Where the velocity magnitude is shown together with a plot of the lift, its current value and the value for the angle of attack (AoA).
As you see, the workflow is a standard workflow that can be easily implemented with macros. Nonetheless, the interns included a nice feature within the simulation. It is possible to vary the angle of attack on the fly without; further use of extra macros as shown here: AoA Trick
Could you take some time to guess how this feature was implemented? What would be your strategy? (Without using any extra macro.)
Compare your strategy with the one used by the interns. Look first at an overview of the geometry and boundary conditions:
The model is a 2D simulation with; two boundaries: The wall; Airfoil for the NACA profile.
And environmental pressure for the far field. (The macro also allows you to specify its radius.)
All simulations have a constant Mach number equal to 0.1, as all the experiments in NOEW were done at such conditions.
The angle of attack has been defined as a field function, as shown below:
Now, the enigma is solved: How is this information transferred to the wing?
Simple: You do not move the wing at all but the point of view. This is possible because the program allows for the application of a field function to the current view through a transform (geometrical transformation).
Below, you see the angle of attack at 0 degrees with no transform being applied:
Now you see the AoA has been changed to 25 deg: (Again with no transformation)
Finally, apply a rotation of -25 deg to the scene point of view:
The rotation is also applied to the lift report as the Y-axis has also been transformed.
I've attached the macro NACA_Workflow that builds from scratch this simulation. The macro uses a companion Java file (Workflow) to compartmentalise each action. That facilitates macro maintaining across versions. The macro has been successfully tested from Simcenter STAR-CCM+ v10.06 until v11.04 without changes. Also attached are two NACA profiles to begin your wing collection.
All this was the work of the previous internship. Your task now as an intern is to expand it. Your first request is to solve the task that was posed in the; Simcenter STAR-CCM+ Macro Competition 2016:
- Create a Simcenter STAR-CCM+ macro that runs the attached simulation (Macro_Competition_NACA45110.sim) for 1000 iterations.
- At the end of the run, the Lift Report value is printed in the Simcenter STAR-CCM+ output window.
- The winner is the one whose lift Value is closest to 0.
- In the macro, the only parameter from the simulation you can change is the angle of attack. (This angle is defined in field function _AngleF_NACA45110.) Also, you should use the double-precision version of Simcenter STAR-CCM+.
The winner of the competition achieved a value of:
Lift Value =1.1374776332395697E-5 N
Can you beat this value?
A solution to this task will be given in the next article of this series.
See also:
Macro Competition 2015. Solution to Task A: Fly-through a pipe.
Macro Competition 2015. Solution to Task B: Camera motion in 3D space.