Introduction

Here are some steps I have taken to look at a tutorial requested in the forum to model flow past a car and a brick using Salome, Code_Saturne and Paraview. I am new to these programs and I'm using this to help me learn so please let me know if I'm doing anything wrong or if there are better and alternate ways. I also assume people are pretty familiar with the interface fo Salome, there's some good tutorials on Salome Platform.

Importing the .stp

Here we will import the STEP file mustbrick001.stp into Salome. It can be downloaded from here.

Run Salome and open and save a new file then launch the geometry module. From the menu choose File -> Import, then navigate to where you have unzipped the file mustbrick001.stp to, change file type to STEP and then double click on the file. It should open in the geometry window, click the magnifying glass to fit it to window.

Set up the model for meshing

The STEP file has been succesfully imported but you cannot do much with it just yet; expand the Object Browser and you only see mustbrick001.stp\_1. Clicking Measures -> Point coordinates allows us to examine what we have just imported, clicking around the model we see that the outer rectangle is about 31km long (Salome uses metre units). Cicking the front and back of the car we find it is 4501m long, it should probabley beabout 4.5m so we will scale it down by 1000.

Select New Entity -> Basic -> Point and use the defaults tohave a vertex at the origin, now select Operations -> Transformation -> Scale and put the imported file as the main object, the new point we created as the scale point and the scale as 0.001. We are now working in the correct size! Choose the new object, Scale_1, in the Object Browser and right click on it and choose display only.

Explode this new shape into Solids (New Entity -> Explode) and there is now Solid_1 (the air block minus car shape) and Solid_2 (the brick). Subtract the brick from the air block (Operations -> Boolean -> Cut) to get Cut_1. You could go straight into meshing from here but it's a good idea to name faces to make the meshing easier.

Click New Entity -> Group -> Create, select the thrid Shape Type (faces), as the main shape select Cut_1 then to create groups type something meaningful in Group Name then click Select Sub-Shapes button and shift click in the geometry window to select the face(s) you want for that group. You then click Add and a number appears in the box, click Apply and make your next group. I created the following groups Face groups

After we are done creating groups we are ready to mesh.

Create mesh

I made a chunky mesh to save on computation time. Launch the Mesh module in Salome.

Cross-section through the mesh

Export the model

Right click on Mesh_1 in the Object Browser and select from the menu Export to MED file (or one of the other formats, though Code_Saturne does not support STL as far as I am aware and I have had trouble further down the line with UNV). Type the name of your mesh file and we are done.

Set up model in Code_Saturne

Create your study and test case where you like (in the terminal type cree_sat -etude CAR_BRICK CAS1) and then copy the mesh file into the MAILLAGE (CAR_BRICK/MAILLAGE) folder of your study. Now navigate to the DATA folder of the case (CAR_BRICK/CAS1/DATA) and launch Saturne (type .\SaturneGUI).

Do File -> New File and save it as whatever you wish. In the Calculation Environment -> Solution Domain the mesh should be there and if you click the Stand-Alone-Running tab and then the Space Shuttle button it will run the preprocessor. What this does is get the group names that were defined in the meshing process, the terminal will read out information on this.

Now under Thermophysical models -> Calculation features select Steady Flow and leave everything else the same. The Thermophysical models -> Initialization Reference velocity change to 25 m/s but everthing else can remain the same.

Under Physical properties -> Gravity.. we can add gravity by typing -1 into the Gravity along Z box and Normalizing with the apple button (I have z as the vertical axis).

Now Under Boundary conditions -> Definition.. if you click the file open button next to Import groups and references from Preprocessor listing and double click on listenv.pre the groups from the mesh have arrived but all as walls, select each in turn and modify to the correct types.

Boundary regions

Now enter the Dynamic variables boundary conditions and for the inlet change U = 25 m/s and Hydraulic diameter to 2m. Give the ground a roughness height of 0.2m.

Launch the solver

Under Calculation control -> Steady management change iterations to 10 and the under Calculation management -> Prepare batch calculation click the select batch script button and choose the lance file. Then it is just a case of saving and then click Code_Saturne batch running. Your terminal window will let you know what's going on. It should run and complete very soon, to increase iterations change where we entered 10 earlier to a new (higher) number, click on Start / Restart under calculation management and change the option to on, then select the SUITE.xxxxxxx file, where xxxxxxx is the date and time of the calculation you will be restarting.

Post processing

Open paraview and load up the file CAR_BRICK/CAS1/RESU/CHR.ENSIGHT.xxxxxxx/CHR.case. I am still learning to use paraview but this result was obtained by using the Extract Surface Filter and using a clipping box to show only the ground, car and brick which are then coloured by pressure. Using the Cell Data to Point Data filter allows the stream tracer to be used (I used a line source for the seeds).

Streamlines over the car body

-- JamesMcNaughton - 2009-11-18


Current Tags:
create new tag
, view all tags
Topic attachments
I Attachment Action Size Date Who Comment
pngpng car_brick_post.png manage 38.5 K 2009-11-18 - 16:04 JamesMcNaughton  
Topic revision: r2 - 2009-11-18 - 16:10:39 - JamesMcNaughton
Main.McNaughtonCarBrickTutorial moved from Main.CarBrickTutorial on 2009-11-18 - 14:31 by JamesMcNaughton - put it back
Main Web
11 Dec 2018

Site

Manchester CfdTm
Code_Saturne

Ongoing Projects

ATAAC
KNOO

Previous Projects

DESider
FLOMANIA

Useful Links:

User Directory
Photo Wall
Upcoming Events
Add Event
 

Computational Fluid Dynamics and Turbulence Mechanics
@ the University of Manchester
Copyright © by the contributing authors. Unless noted otherwise, all material on this web site is the property of the contributing authors.