Home
Shear driven cavity flow
Contents
1. 2 eDF Now select Mesh quality criteria in the left hand column In this menu the Check mesh facility can be used to analyse the mesh and for visualisation of the mesh quality criteria export files in the specified output format As shown in Fig 4 20 below the Ensight Gold format is preselected by default Mesh quality criteria Post processing format EnSight Gold MED format bin CGNS CCM I0 polygons display polyhedra display big endian Check mesh Figure 4 20 Mesh quality criteria output file format selection Options Next move to Thermophysical Models to specify the flow physics for the calculations In Calculation features change unsteady flow to steady flow in the choice of algorithms at the top Leave all the other default values unchanged single phase flow is active and the multiphase atmospheric combustion electrical and compressible models are all inactive Fig 4 21 m Steady Unsteady flow algorithm steady flow rEulerian Lagrangian multi phase treatment off v Atmospheric flows off v Gas combustion off v Pulverized fuel combustion off Y Electrical models off v m Compressible model off Y Figure 4 21 Selection of the flow physics Continue setting up the Thermophysical Models By default Mobile mesh ALE method is not selected Th
2. st maw at inteo jE READ E Code M dasrec A runsat rme Gi Layers J tSaiom Calcul truncasel CI thia3 RR sting se satom ese JIE i Figure 4 9 Cavity with the edges faces and groups Cavity is now ready to be meshed Save the file and proceed to Meshing 4 4 2 Meshing Switch to the meshing module which opens the VTK scene viewer as shown in Fig 4 10 below In this view the background colour has been changed to white similarly to the OCC scene viewer for the Geometry by right clicking in the viewer and accessing Change background 4 Applications Places System Gay zoom amp Ble Edt Wew Mesh Comtrois Modificaton Measurements Jools Window Help SALOME Dawes Gm e Hakea Pui dd div YYVVieddwevasddra BB Object Browser OCC sceneit viewer Create Mesh VIK scene 1 vewerl Do pPhLASPLVIscC CCMSaHiSe ec uo Python 2 6 6 r266 84292 Apr 26 2011 11 59 41 GCC 3 4 6 20060404 Red Hat 3 4 6 9 on linux2 type help to get general information on environment gt gt gt Croato Mesh li naenc at mama E inatenoc fl inEADN Codes MM paste A trunsato s rme GMP a Layers Cascula RR truncasei raa J j songi se saone est JO Figure 4 10 Switching to the Mesh module Similarly to the earlier creation of the geometry object Cavity in the Geometry module a Cav
3. Having clearly identified parts of the Cavity on which meshing and boundary characteristics can be attached the Cavity could be meshed now However for convenience the edges and faces will first be assembled in a smaller number of easily identified groups This will make it easier to specify geometry parts later in the mesher g eDF First the faces are grouped according to the boundary types listed in Table 4 2 above Right click on Cavity in the object browser and select Create Group to activate the pop up menu as shown in Fig 4 7 below amp Applications Places System SSagase 6 48PM amp ge SALOME 6 3 1 Cavity BIO File Edit View New Entity Operations Repair Measures Tools Window Help SALONE 5 Dax Perr sla sea 4 0904 SH 9800460 BELL SAGO SH gt gt gt gt Object Browser az Create Grou 86880680060 OMe ee Geometrical parts of the Second Shape D Only Sub Shapes of the Second Shape Shows subsshepes second shape e Select All Add ie red Remove Apply and Close Apply Close Help Python 2 6 6 r266 84292 Apr 26 2011 11 59 41 GCC 3 4 6 20060404 Red Hat 3 4 6 9 on linux2 type help to get general information on environment gt gt gt loe _ o rr sist nn R e E natero 5 imat 5 nat ro READ E code_ ME bashrc E RunSal The Gl w Layers _tSaiom Calcul
4. J runcase bia3 tistingi sALom ECM amp Figure 4 7 Creating the Stationary_wall face group Alternatively access the group creation via New Entity or its short cut icon on the main menu bar Select the Face icon as Shape type name the group and ensure that the Main Object is Cavity To be easily identifiable the groups are named after their boundary types The first group is created for the external stationary walls and named Stationary_wall With the default no restriction choice already active in the Main shape restriction selection menu start adding the required faces by left clicking on them in the Object Browser The faces may be added one by one or together by multiple selection through left clicking and holding the Ctrl key Press Apply and repeat these steps for the next two groups Symmetry_plane and Sliding_wall pressing Apply each time Do not close the Create Group pop up menu and move to creating groups for the edges Here the edges are grouped per direction in order to later be able to designate different discretisations along the X Y and Z directions in the mesher Switch the Shape type to the symbol for edges name the edge groups according to their direction and add edges picked from the Object Browser as seen in Fig 4 8 below amp Applications Places System CESSI 6 52PM amp SAL
5. open one of the profile file to inspect its structure The requested variables are listed in column format as a function of the x y z coordinates of the points along the profile line defined by in the GUI Open the listing file to check that the calculation has converged towards stable values The minimum and maximum values of the solution variables and the solution residuals for these variables are listed in summary tables at each iteration By comparing the initial and final values in the derive column for each variable and their evolution throughout the calculation check that the residuals have decreased by at least two orders of magnitude Figs 4 34a b INFORMATION ON CONVERGENCE INFORMATION ON CONVERGENCE Variable Rhs norm N iter Norm residual derive Variable Rhs norm N iter Norm residual derive c Pressure 0 22286E 03 152 O 26549E 04 0 10000E 01 c Pressure 0 83182E 11 0 0 11848E 06 0 13010E 07 c VelocityX 0 24601E 03 24 O 52360E 00 0 10027E 00 c VelocityX O 28547E 03 0 0 10042E 06 0 00000E 00 c VelocityY 0 24601E 03 24 O 52360E 00 0 92055E 03 c VelocityY 0 28547E 03 0 0 10042E 06 0 00000E 00 a After 1 iteration b After 400 iterations Figure 4 34a b Convergence history from the listing file g eDF Inspect one of the monitoring files in the monitoring directory The value of each variable is recorded in separate files at all the monitoring points defined in the GUI and as a functio
6. 4 Keep the default colours for each line so that they are consistent for each monitoring point For the Y velocity change the variable names to Y Vel where i 1 2 3 and 4 The graphs also confirm that the velocity components at the four monitoring points settle to a stable constant value after about 100 iterations indicating that the calculations are converged Fig 4 39a b s s a X velocity b Y velocity Figure 4 39a b Velocity components at the four monitoring points as a function of iteration You may now post process the results from the calculations From the top menu by selecting File gt Open ParaView File or by right clicking on the builtin object in the Pipeline Browser panel and selecting Open access the pop up Open File panel and choose the RESULTS case file from your run The RESULTS case object will be added to the Pipeline Browser and its contents displayed in the Object Inspector panel underneath Press Apply to load the data in ParaVis Next to extract the computed data in terms of fluid domain and boundary data in the top menu bar click on Filters gt Alphabetical gt Extract Block The new object ExtractBlock1 now appears in the Pipeline Browser With the object highlighted move to the Block Indices panel of the Properties tab In the data tree under Root select Fluid domain to visualise t
7. 4 6 Running and Analysing the Simulation e 25 4 7 POSIEDIOCESSING ING RESUS inonncsencocncannicoxweduricoenssdtines eau e nier Ean ETNE Epen 26 O E EE E CS A E A OAA NT A A A A A ee 32 Appendix A Reference Data from 4 ccceccsesseeeeeeeeeeseeeeseenseeeaseeeseeeseseaseoaees 34 gt CDF 1 Components This tutorial makes use of e The SALOME 1 platform for geometry generation meshing and post processing e Code_Saturne 2 3 for CFD calculations e Reference 4 for comparison with published results To work through this tutorial you will need a computer on which these two software applications are already available or on which you have permission to install them 2 Introduction This tutorial is built in two complementary parts The first part describes and runs the user through all the procedures required to get going with setting up CFD simulations using SALOME and Code_Saturne from code download to case creation The second part illustrates setting up running and analysing a CFD simulation entirely with SALOME and Code_Saturne using the laminar Shear Driven Cavity as an example of a simple case yet with enough physics to make it interesting and relevant to practical problems If you are already familiar with setting up CFD simulations with Code_Saturne and SALOME you may go directly to Part Il gt eDF 3 PART Setting up The first part of the tutorial is designed to
8. 6 9 on linux2 elp to get general information on Pri rei le B nare mato a bia3 C Ei S Figure 4 13 Complete specification of Cavity_ mesh and sub meshes i in the three directions To mesh the computational domain right click on Cavity_ mesh in the Object Browser and select Compute as shown in Fig 4 14a below Again with Cavity_mesh selected Compute can also be accessed via the main menu bar and either the Mesh category or the short cut icon The mesh is created and a pop up window appears automatically summarising the mesh characteristics Fig 4 14b S Appications Races System casa Ss Applications Places System 0ezsN amp 7 23PM amp S Ich 0 xX Ele Edt View Mesh Controls Mocificaton Measurements Jools iWin Hebb File Edit View Mesi trols Modifi ments Tools Window Help SALOME 5 n gt ja 5 a 7 i Ou so Snare wr Bit IL care LEE RI RARTI RE NAT rr eria di 4rnkPrZ4db gt gt gt 9 Object Browser Jai OCC scene 1 vewe Obj K scene l viewer 1 sE GES DipLrr 09090 9 Tra 07002 c0omanR irene Cavity gp Mest Mesh computai d x Hypotheses Compute mesh gt onthms i Cavty mash i oa Cavity Renat Ld ri a ppied wgonthmns Create Seb mesh Name aa Edk MeshiSub mesn Cavity_mesh Pry SS ___ 4 a Preview y otal Linear Quadrat asos D Cva
9. is automatically added You are now ready to set up the CFD simulation with the Code_Saturne Graphical User Interface GUI 4 5 Setting up the CFD Simulation The CFD case is setup and run from the Code_Saturne GUI Go to the case directory Reynolds1000 and start the GUI by typing code_saturne gui A startup screen with blank Study Case and XML file categories will appear as shown in Fig 4 18a below See Tutorial Part to recall how these directories relate to the Code_Saturne file structure or the Code_Saturne manuals and documentation 3 for a more in depth description g eDF Select File gt New file in the top left drop down menu bar LI Code Saturme GUI File Jools Window Hep O Bi Study Casa Figure 4 18a b Code_Saturne GUI startup left and initial screen for a new case right The GUI automatically recognises the directory structure and by default fills in the Study and Case categories with the names of the study and the case the GUI is running from If not redirect the GUI to the desired Directory of the case Fig 4 18b If the file structure under the case directory is correct Section 3 4 the GUI will then correctly recognise and identify the different directories The GUI file should now be saved Select File gt Save and input Reynolds1000 in the empty Name box of the Save File As popup Fig 4 18b By default
10. may be read in ParaView Using the button add four monitoring points situated at 0 25 0 5 0 0 0 5 0 25 0 0 0 5 0 75 0 0 and 0 75 0 5 0 0 Fig 4 29 Output Control Writer Mesh Monitoring Points Monitoring points output Monitoring points files at each time step Format csv Monitoring points coordinates Figure 4 29 Definition of monitoring points In the Volume solution control Calculation control sub folder deactivate the Print in listing for VelocityZ but keep it active for Post processing Fig 4 30 Whilst listing the Z velocity in the calculations listing output file is not of interest all three velocity vector components must be present in the results file in order to visualise streamlines and velocity vectors with ParaView in the post processing stage 2 eDF Solution control Pressure 1234 Velocityx 1234 VelocityY 1234 VelocityZ O 1234 total_pressure 1234 LocalTime 1234 CourantNb 1234 FourierNb 1234 Figure 4 30 Selection of output variables Click on the Surface solution control sub folder and deactivate Post processing for Yplus and Efforts as they are not relevant to these simulations Fig 4 31 Solution control Figure 4 31 Selection of output variables on the surfaces of the domain Lastly we want to output one dimensional
11. plots of the X left and Y right velocity components As expected the maximum velocity in the X direction occurs at the top wall where it nears 1 0 m s Fig 4 43a The locations of the blue flow in the negative direction and red flow in the positive direction areas in both plots Figs 4 43a and 4 43b indicate that the flow is entrained by the top wall in a clockwise circular motion inside the box These plots are useful to verify overall velocity magnitudes and patterns but to get a better visualisation of the flow next create streamlines which will show fluid particles trajectories To make it possible to locate the streamlines with regard to the Cavity you are going to create a combined image showing the streamlines superimposed on top of the mesh First create the streamlines With CellDatatoPointData1 selected in the Pipeline Browser click on Filters gt Common Stream Tracer in the top menu The SteamTracer object is then added under CellDatatoPointData1 in the Pipeline Browser Keep the CellDatatoPointData1 object selected and visible eye icon in bold next to the object In the Object Inspector select the Display tab In the Color category choose Solid Color in the Color by drop down list In the Style category change the Representation to Wireframe and decrease the Opacity to 0 1 Fig 4 44 eDF Pipeline Browser o w builtin RESULT
12. profiles of variables along straight lines at the end of the calculations Click on Profiles and add two profiles which go through the centre of the Cavity The first one for the X velocity along the Y axis and the second one for the Y velocity along the X axis In turn specify all the fields listed below the table of profiles starting with Filename and finishing with the variables which are to be stored on output When all these fields have been added press Add above Filename to add the profile to the list Do not move to another folder or sub folder in the GUI without first pressing Add or you will lose all your selections For the X velocity profile choose XVel_YaxisCentreLine for both Filename and Title and csv for Format so that the profiles may be read in Paravis The Output frequency is already set to write the file only at the end of the calculation To define the line press on the Mathematical expression editor button adjacent to Line Definition The line is defined by the equation x 0 5 y t z 0 0 where by definition t varies between 0 and 1 0 For the Number of points enter 50 to account for the 50 cells across the domain s height Finally click on VelocityX and use the right pointing arrow to select it in the list of variables and press Add to store the profile in the list Fig 4 32 m Definition of 1D profiles Filename V
13. steps to create and label the graphs are similar to those already detailed for the graphs of the monitoring points data and they are not repeated here For direct comparisons with the plots from 4 for the graphs of X velocity plot the Y coordinate as a function of VelocityX For the graphs of Y velocity plot VelocityY as a function of the X coordinate The reference data provided in 4 for the fine mesh results 129x129 is listed in Appendix A The data can be copied to a csv file which is then imported in ParaView at the same time as the XVel_YaxisCentreLine csv and the YVelXaxisCentreLine csv files Set the plots so that the Code_Saturne and the reference results are visualised in the same view and display the reference points with a marker rather than a line Each data set can then be compared directly with the reference results Fig 4 48a b e Ghia Ghia amp Shin Code_Saturne 0 5 0 6 0 7 08 ag 0 0 1 0 2 0 3 0 4 0 3 0 2 0 1 0 0 1 0 2 0 3 0 4 X velocity m s a Y coordinate versus X velocity b Y velocity versus X coordinate Figure 4 48a b Velocity profiles Comparison between Code_Saturne solid lines and reference 4 results circles Overall good agreement is obtained with the reference results 4 even though the results with Code_Saturne were obtained on a coarser mesh Running on a finer mesh would make it possible to capture the velocity extre
14. to Hypothesis to specify the discretisation in its own pop up menu The Number of Segment object is renamed X_discretisation for future reference Choose 50 segments with an Equidistant distribution and press OK Returning to the Create sub mesh menu press Apply to instantiate the X_mesh sub mesh The sub mesh objects for the other two directions are defined similarly Starting with the Y direction the sub mesh is renamed Y_mesh The same number of segments is applied in the Y and X directions Therefore for this sub mesh the previously created X_discretisation Number of Segment Object is reused in the Hypothesis Complete the specification of Y_mesh and press Apply Lastly the sub mesh for the Z direction is defined Named Z_ mesh it is similar to the X_mesh and Y_mesh but defines the discretisation as 1 segment only For Z_ mesh define a new Number of segment object named Z_ discretisation and specifying 1 segment Complete the specification of Z_mesh and press Apply and Close to instantiate Z_ mesh and leave the Create sub mesh menu The mesh characteristics of the Cavity are now fully specified as shown in Fig 4 13 below where all the characteristics of Cavity_mesh and its sub meshes have been listed Python 2 6 6 r266 84292 Ane r 26 2011 11 59 41 dt 6 gone Red Hat 3 4
15. 3 The DATA REFERENCE directory contains data files tabulated thermophysical properties for chemical species and atmospheric properties and the Python file cs_user_scripts py in which users can modify Code Saturne cs parameters and settings SaturneGUI is a shell file pointing to the Code _Saturne GUI executable Initially the RESU directory is empty It will contain the results files and Code Saturne outputs of each Code_Saturne run organised in chronological order The sub directory SCRIPTS contains the bash file runcase in which the PATH to the Code_Saturne executable and the run command are automatically setup for the case name The sub directory SRC is used to store all the user source files The directory SRC REFERENCE contains templates for all the available files whilst examples of implementation are stored in SRC EXAMPLES g eDF 4 Part Il Shear Driven Cavity Flow CFD Study In the second part of the tutorial the preparation simulation and analysis of the Reynolds1000 case of the DrivenCavity study is described from the construction of the computational domain and mesh to the preparation running and post processing of the CFD simulation 4 1 What You Will Learn Through this tutorial you will learn how to perform an end to end CFD simulation using Code_Saturne 2 3 together with the SALOME 1 platform from creating the computational domain t
16. EDF R amp D A FLUID DYNAMICS POWER GENERATION AND ENVIRONMENT DEPARTMENT SINGLE PHASE THERMAL HYDRAULICS GROUP 6 QUAI WATIER F 78401 CHATOU CEDEX TEL 33 1 30 87 75 40 FAX 33 1 30 87 79 16 MAY 2013 documentation version 3 0 tutorial Shear driven cavity flow contact saturne support edf fr ODE SATURNE Code Saturne Tutorial Series TUTORIAL 1 SHEAR DRIVEN CAVITY FLOW gt eDF gt eDF Document Control Version 1 0 Document reference TutorialNumberi ShearDrivenCavityFlow Revised 27 October 2012 g eDF Outline 1 0110 9 1 eee ee ee ee a ee eee eee eee 4 2 INTOdUCUON rers iii roi ria 4 PT Ui S6tting ech once shee cat iii dieci dichiaro gii ii 5 21 What you Wile aiee E 5 3 2 Using Code_Saturne and SALOME together for End to End Simulations 5 3 3 Accessing and Installing Code_Saturne and SALOME 5 3 4 Setting Up End to End SALOME Code_Saturne CFD Simulations 5 4 Part Il Shear Driven Cavity Flow CFD Study cccccsssseeseeseeseseeseeeeeees 8 4 1 What OME TUS Meee cs en areseeoceecsqesencanpeacsastnieuescaseeoeseeatessedepnaceaetatossceseeasiesiceecscssoeue 8 dA CASSESE ia 8 4 3 Creating the Code Saturnecase iii 9 4 4 Creating the Computational DomMain 9 4 5 Setting up the CFD Simulation ceeccceeeccceeeeceeeeeseeceseecesseeeeseeeesseeeseeenanees 18
17. OME 6 3 1 Cavity BO File Edit View New Entity Operations Repair Measures Tools Window Help DR X b Bem Ha sea PFM OSANA BBCOCCBRO BHOD AAJ SH Ur fr sre Object Browser No restriction 7 Geometrical parts of the Second Shape Only Sub Shapes of the Second Shape Python Console Python 2 6 6 r266 84292 Apr 26 2011 11 59 41 GCC 3 4 6 20060404 Red Hat 3 4 6 9 on linux2 type help to get general information on environment co ae tg gt yv _ t t t t ttttyffftfFffftfddo o e E nat io 5 matb i nat ro READ E Code_ ME bashrc RunSal w The Gl w Layers Salom Calcul I runcase bia3 listing satom GAM Figure 4 8 Creating the X_edges edge group CDF In succession create the edge group X_edges press Apply the edge group Y edges press Apply the edge group Z_edges and conclude the creation of groups by pressing Apply and Close The face and edges groups are now listed under the Cavity object in the Object Browser Fig 4 9 gt gt gt gt a gt a gt gt gt D gt Python 2 6 6 r266 84292 Apr 26 2011 11 59 41 GCC 3 4 6 20060404 Red Hat 3 4 6 9 on linux2 type help to get general information on environment gt gt gt LB nae
18. Resolution Figure 4 40 Selection of visualisation colour defaults Ensure that Automatically Rescale to Fit Data Range is active and press Make Default to save the changes and Close to leave the Color Scale Editor The contour plot of velocity magnitude is now updated for the new colour scale Fig 4 41 Velocity Magnitude 85223 0 8 0 6 0 4 0 2 0 00059 Figure 4 41 Contour plot of velocity magnitude The contour plot indicates that there is a zone of higher velocity flow defined by the green and red zones surrounded by lower and no velocity regions in blue Consistent with the chosen boundary conditions the maximum velocity occurs next the sliding wall and the flow is almost stagnant near the other non slip walls With the HSV colour scale the contour plot is now clear with the different levels clearly differentiable but the image looks tessellated As Code_Saturne outputs data at cell centres in the results file in ParaView each mesh cell is painted with a pixel of colour corresponding to the exact value of the variable in the cell Whilst this cell data visualisation mode is correct to examine exact values at cell centres it can yield ragged images unrepresentative of the solution s higher order spatial accuracy and cannot be used in ParaView to generate vectors and streamline plots Instead to produce smoother images and vector and streamline plots the cell data c
19. S case ExtractBlock1 CellDatatoPointDatal StreamTracerl Properties Display Information Display o amp Style a Representation Wireframe Interpolation Gouraud gt Point size 2 00 s Linewidth 1 00 T Opacity 0 10 GI i i Subdivision 1 a Figure 4 44 Selection of opacity The mesh lines displayed in the ParaView scene Viewer should now display in faint black colour Next select the StreamTracer1 object in the Pipeline Browser In the Object Inspector select the Properties tab and modify the default settings for Seeds For a Point Source Seed Type modify the X and Y coordinates of the seed point to 0 15 and 0 05 respectively Request 60 000 points Number of Points and a radius of 1 0 Radius as shown in Fig 4 45 below Press Apply to validate your changes Properties Display Information Properties Ga Apply Reset 2 Delete 2 Seeds a Seed Type Point Source gt v Show Point Center on Bounds Point 0 15 0 05 0 004999999999 Number of Points 60000 Radius 1 LI Note Move mouse and use P key to change point position Figure 4 45 Selection of streamlines settings In the Display tab choose Velocity and Magnitude from the Color by drop down lists of category Color and vis
20. Saturne returns data files which are compatible with SALOME In the post processing step SALOME makes it possible to visualise and analyse the Code_Saturne results 3 3 Accessing and Installing Code_Saturne and SALOME Access to both applications is provided through their respective internet sites Install utilities installation instructions environment variables setup for Linux installations and code documentation including user manuals can also be downloaded from the sites e Code_Saturne Intermediate and Stable Code_Saturne releases can be downloaded from the website www code saturne org From version 2 1 0 onwards the code is packaged with all its libraries and the installer which can also be downloaded from the same site makes the installation process fully automatic However external required packages such as Python are not part of the Code_Saturne package and must be acquired from their respective publishers and installed separately As part of the installation process the Code_Saturne installer will check for their availability and issue notifications if they are not found e SALOME Different versions of SALOME can be downloaded from the website www salome platform org Complete versions come with the source and binary files and interactive installation procedures 3 4 Setting Up End to End SALOME Code_Saturne CFD Simulations The directory and file structures required and generated by Code_Saturne and SALOME are descr
21. Specific heat does not need to be altered as it is not a parameter in these isothermal calculations Likewise gravity is not a parameter of this problem constant density therefore the Gravity category does not need to be visited and changed Click on the Volume Conditions folder Sub volumes of the computational domain Volume regions definition have not been defined as separate regions for initialisation and Coriolis source terms are not taken into account in this tutorial Therefore the Volume Conditions category must be changed only for Initialization In this sub folder press on the icon button next to Velocity to bring up the Mathematical Expression Editor and change the initial u velocity to 0 1 m s as shown in Fig 4 24 below m Initialization Volume zone fall cells x Velocity Ea Oo Mathematical expression editor x User ex pression Predefined symbols Examples Cancel Figure 4 24 Selection of initial values To define both the boundaries and the boundary conditions under the Boundary Conditions folder select Definition of Boundary Regions and then press add three times to add three boundary conditions By default the newly added boundary regions are given the Wall type of boundary conditions The first boundary in our problem is the side walls which are considered stationary and non slip In the first row of the list of bounda
22. an be interpolated to cell vertices corners using the ParaView Cell Data to Point Data filter Having clicked on ExtractBlock1 in the Pipeline Browser to select it in the top menu bar click on Filters gt Alphabetical gt Cell Data to Point Data The new object which now stores the fluid domain data interpolated to cell corners is added in the Pipeline Browser Fig 4 42 CDF Pipeline Browser E builtin gt RESULTS case x ExtractBlock1 CellDatatoPointDatal Figure 4 42 CellDatatoPointData filter added to the Pipeline Browser With CellDatatoPointData1 selected in the Pipeline Browser click Apply in the Properties tab of the Object Inspector to bring up the smoothed out contour plot in the ParaView scene viewer Picking the different variables to map either from the Display tab in the Object Inspector for the CellDatatoPointData1 object or directly from the drop down list in the menu bar for contour plots at the top of the SALOME window create contour plots of the X and Y velocity components as shown in Figs 4 43a b below The plots use a Surface mode of Representation which can be selected either from the Display tab and Style category or directly from the drop down list in the contour plot menu bar Velocity X Velocity Y 0 852049 0 340403 0 75 0 2 0 5 0 sn 0 2 0 4 0 25 0 34562 1 0 572616 Figure 4 43a b Contour
23. ariables XVel YaxisCentreLine VelocityX Add Modify Delete Filename XVel_YaxisCentreLine Format CSV bd Title XVel_YaxisCentreLine Output at the end of the calculation x 5 frequency at the end of the calculation 1 Line Definition A Number of points 50 VelocityX total_pressure Figure 4 32 1D output profiles specification Repeat the procedure for the Y velocity profiles this time entering YVel_XaxisCenterLine for Filename and Title x t y 0 5 z 0 0 for the equation and selecting VelocityY Press Add to complete the definition of the profiles The Reynolds1000 case CFD simulation is now ready to run gt eDF In the folder Calculation management go directly to the Prepare batch calculation sub folder By default the calculation restart is deactivated in Start Restart and so this sub folder does not need to be visited In the Prepare batch calculation sub folder panel Fig 4 33 the default selections of runcase for the Script file standard straight calculations without mesh or partitions import or pre processing and 1 processor for the Calculation script parameters are already set Script file Select the script file runcase Calculation script parameters Run type Standard Number of processes 1 Advanced options Calculation start Start ca
24. de_Saturne Before exporting the file it is important to highlight an important naming convention As the names of the mesh and its elements will be used as their identifiers in Code _Saturne they should not include any blank spaces or they will not be recognised by Code_Saturne Save the SALOME file and export the mesh file in med format by selecting from the main menu File gt Export gt MED file as shown in Fig 4 17 below The file should be placed in the MESH directory of the DrivenCavity study where Code _Saturne will expect the file to be situated by default 4 Applications Paces system AGAS file Ede Wew Mesh Comtrois Madificaton Measure ments Jools Window Help in fa mesh Slap are dd dI dh Prvr7sd4oNkpz7 d gt BB OCC scene wewer 1 VTK scene 1 mewer l aU rhAeevarscGoman Seler uu Dump Study QD pemi Notebook amk Load Script Git pun Fropemes n Python 2 6 6 r266 84292 Apr 26 2011 11 59 41 GCC 3 4 6 20060404 Red Hat 3 4 6 9 on linux2 type help to get general information on environment gt gt gt import MED file tm nec ai mama E nat ioc B reann B Code S RI pasnrc E runsato The GIMP wr Layers Caiculat J truncasei 0 iwta3 c I pusong sALoMe e_N se Figure 4 17 Exporting the mesh file in med format For the file name choose Cavity_mesh the med extension
25. erefore as the mesh in our case is Stationary Deformable mesh does not need visiting and changing However Turbulence models needs to be changed to No model i e laminar flow which is the correct flow regime for the flow Reynolds number that we have chosen Fig 4 22 Turbulence model No model i e laminar flow Figure 4 22 Selection of turbulence models Thermal model is inactive by default Therefore it does not need to be visited and changed Save the file and as there are no additional scalars skip the Species transport category and move to the Physical Properties folder where the thermal and physical characteristics of the fluid of interest for the calculations will be specified In Reference values the pressure reference value of 101325 0 Pa is set by default and does not need to be changed The other default values for velocity and length can also be left unchanged gt eDF However the Fluid Properties must be modified for our imaginary fluid Click on Fluid Properties in the left hand panel and as per Fig 4 23 below alter the values of Density and Viscosity to the chosen values which are listed in Table 4 1 above m Density Reference value p fo o kg m Viscosity Reference value u floe 3 Pa s Specific heat Reference value Cp 1017 24 0 t Ci Jikg K Figure 4 23 Selection of fluid properties The default value for
26. ersus X at the horizontal mid plane Data reproduced from 4 R 1000 129x129 mesh
27. explain the preliminary steps to setup an end to end CFD simulation using Code Saturne and SALOME and provide an introduction to these software applications 3 1 What you will learn In the first part of the tutorial you will learn e How Code Saturne and SALOME may be combined for end to end CFD analyses from CAD generation to post processing of CFD results How to access and download Code_Saturne and SALOME How to install Code_Saturne and SALOME How to set up the control variables for both codes How to set up a case with Code_Saturne 3 2 Using Code_Saturne and SALOME together for End to End Simulations End to end simulations are described as the multi stage process of starting from a geometric description of the object of interest which will form the computational domain all the way to completing and analysing CFD simulations for this object and the physical phenomena flow energy relevant to the operating conditions This process can be divided in three main steps In the pre processing step SALOME makes it possible to build the virtual representation of the geometry and to generate a computational mesh which is compatible with Code_Saturne In the processing step the Code_Saturne Graphical User Interface GUI makes it possible to generate the CFD physical and numerical model specify the calculations possibly on multiple processors and to execute the Code_Saturne solver for this model on the mesh created in SALOME On output Code_
28. f boundaries which can be further specified Fig 4 26 Boundary conditions Selection criteria Stationary walls Sliding wall Smooth or rough wall smooth wall rough wall r W Sliding wall ujio ms v oo ms wfoo ms Figure 4 26 Specification of sliding wall The symmetry boundaries are fully defined and do not need further specification Therefore they do not appear in the list However Wall boundaries can each be further defined as smooth or rough and as Sliding wall By default the wall surface is smooth and this parameter does not need to be changed The Stationary_walls boundary is fixed and fully specified However click on the Sliding wall boundary and activate the Sliding wall selection Fields then appear for the U V and W velocity components of the wall By default these velocities are null Click in the U field and enter 1 0 as shown in Fig 4 26 The mesh and physics of the problem have now been set up Now parameters related to the calculation can be specified In Numerical Parameters leave the settings unchanged in the Global parameters sub folder and move to the Equation parameters In the Scheme tab apply the Centered scheme and deactivate the Slope test for all three components of velocity Fig 4 27 The former will provide second order accuracy in space and t
29. ficiently large number of iterations This is explained further in Section 4 6 below Click on the Output control sub folder panel The first three tabs Output Control Writer and Mesh are set by default to the correct values for this case and do not need to be changed The Log frequency in the Output Control tab is set to print the calculations diagnostics such as the residuals at each time step In the Writer tab the format of the results file which will be used for post processing is already set to Ensight which is compatible with the SALOME module ParaVis which will be used to post process the results after the run The file will be located in the postprocessing sub directory of Reynolds1000 RESU runDateAndTime where runDateAndTime corresponds to the time at which the run was started Clicking on the results row brings up the additional information about the Frequency Time dependency and Options As already set the results file will only be written at the end of the run and on the Fixed mesh used for this case The Options relate to the specific details of the file format The Mesh tab is already set to output the calculations data in all the fluid cells and at all boundary faces to the results file In the Monitoring Points tab change the Monitoring points output file format to csv so that the files
30. he data calculated at the cell centres inside the cavity walls Left click on the Display tab of the Object Inspector In the category Color next to the Color by heading two drop down menus allow you to choose the variable to visualise Choose Velocity in the first one and Magnitude in the second one Contour plots of the velocity magnitude are then displayed in the ParaView scene viewer By default the colour scale is set to the RGB colour scheme which is inadequate To modify the visualisation colour scheme click on the button Edit Color Map in the Color category of the Display tab and bring up the Color Scale Editor pop up panel Fig 4 40 In the Color Scale tab of the editor click on the Choose Preset button and select Blue to Red HSV in the list of Preset Color Scales Press Ok g eDF v Color Scale Editor x Color Scale Color Legend Render View Immediately Save Choose Preset Color Scalar Value Use Logar Preset Color Scales Y Automati F J Name Color Space Minimum E J Cool to Warm Diverging Blue to Red Rainbow HSV Use Discre Red to Blue Rainbow HSV Grayscale RGB X Ray RGB Blue to Yellow RGB Black Body Radiation RGB Black Blue and White RGB Black Orange and White RGB Cold and Hot RGB Rainbow Desaturated RGB Rainbow Blended White RGB Rainbow Blended Grey RGB
31. he latter is unnecessary for a smooth flow Solver Scheme Clipping Blending Slope RHS Sweep VelocityX Centered VelocityY Centered 1 z 1 VelocityZ Centered i CO 1 Figure 4 27 Specification of the flux schemes gt eDF To set the time step move down the selection tree to the Pseudo Time step sub folder Change the Number of iterations to 400 and increase the Maximal CFL number to 8 0 leaving the other parameters unchanged Fig 4 28 Time step option Reference time step 0 1 s Number of iterations restart included 400 Maximal CFL number lso Maximal Fourier number 10 0 Minimal time step factor or Maximal time step factor 1000 0 Time step maximal variation or Option zero time step Figure 4 28 Selection of the number of iterations and CFL number Move to the Calculation control folder Time averages are not of interest for these simulations and the sub folder does not need to be visited However we want to keep track of the solution at different monitoring points to see how it evolves during the calculations Aside from the solution residuals and the minimum and maximum values of the flow variables which Code _ Saturne outputs during the calculations tracking the solution at significant monitoring points is a very important means of gaining confidence in the convergence of the calculations and judging whether calculations have been run for a suf
32. hste Er Tople ed hypothesi Nodes 5202 non x s 4 Change submesh prorty as soe led algorithm OD Elements 0 A gular_1D LS rai Update a uv tiva Di Edges 404 oi amp Mesh informe 7 Ap ses Be Find Bement by Point a Zep hypo ies Faces 52 x n Triangl 0 0 0 3 nS gt Cea Bs see eda go rithm Quadrangles 52 z_me o Ca bt z pt Polygons o a lumes 2500 250 A ape dea ta io ea othes do a p F sF pple Mie Tetrahedrons 0 4 ns RM Com ix a spl eda algor rithm Hexahedrons 2500 j Delete Pyramids 0 Prisms 0 0 Aut Polyhed 0 Pofre Clos Coll Find la a le 2j jel 2 Console Python Console ajzj hon 2 6 6 r266 84292 Apr 26 cca rpg dec 2 4 6 20060404 Re dH vendor hon 2 6 6 r266 84292 Apr 26 2011 pei me dai GCC 3 4 6 20060404 Red Ha ui Si 6 9 o ion on sun type help to get general info mon ana get general inform gt gt gt gt Computo GM nigi di mangi di pago i a B nat ioc 5 matb 5 Inat loc JM READM BR Code_s bashre I tRunsato The GIMP Layers Calculat JI truncase 1 O las c I tistingi sALowe FAMMI amp Figure 4 14a b Meshing activation left and resulting mesh right Before the mesh can be used in Code_Saturne the boundary surfaces must be identified so that it will be possible to impose boundary conditions in Code_Saturne To designate these surfaces we now can call on the grou
33. ibed first and then illustrated by example through the creation of all the pre requisites for the Shear Driven Cavity Flow end to end simulations 3 4 1 File structure e Code Saturne Code Saturne makes use of a pre set directory structure to access and save input and output files Simulations are organised in terms of studies and cases Conceptually a study contains a series of cases which all rely on the same geometry The cases represent different instances of simulations for this common geometry for example for different operating conditions The command code_saturne is used to set up the study and case structure automatically by executing code_saturne create s NameOfStudy c NameOfCase When executing the command Code_Saturne not only creates the directory structure for the specified study and case but also all their sub directories and required files The automatic procedure ensures that all the files required by Code_Saturne are available and in the expected directories If a study already exists a new case may be created automatically simply by executing code_saturne create c NameOfCase within the study directory An example of study and case creation is given in the next Section for the Driven Cavity case which is detailed in Part Il e SALOME SALOME does not require a specific directory structure or input and output files Whilst a Python Textual Interface TUI may be used to record macros of instruct
34. icant modifications That way your latest work is preserved and should mistakes happen it is always possible to exit SALOME and restart it from the latest saved file As SALOME is an integrated interface to different capabilities CAD meshing visualisation the next step is to access the Geometry module of the program in order to start building the shape of the computational domain In the main menu bar either click on the Geometry icon or choose Geometry from the drop down module menu as shown in Fig 4 2 below SALOME 6 3 1 File Edit View Tools Window Help Ji ld Hi X Q amp ir SALOME Fasea Fm oc T SALOME amp Mesh Post Pro Med P vacs RI Paravis Figure 4 2 Selecting Geometry in the application chooser The Geometry menus then become available in the top bar and the OCC scene viewer opens in the right hand side where the geometry objects can be visualised and manipulated The scene viewer comes with its own set of 3D viewing menus to control the display and perform operations such as panning in and out and rotating and moving the object in the scene The Geometry module of SALOME makes it possible to build bespoke objects from scratch from constituting elements such as vertices edges and faces or from pre set generic shapes In this instance we use the latter more direct method and create the cubic cavity shape by selecting New Entity gt Primitives gt Box Alte
35. ions which can then be read in by SALOME and executed automatically creating the geometry of a computational domain and meshing of the domain can be conducted entirely from the Graphical User Interface GUI The GUI can be started from any directory as per the instructions from 1 3 4 2 Shear Driven Cavity Flow For this example in the tutorial directory we create the DrivenCavity study and the first case which we name Reynolds1000 after its flow Reynolds number code_saturne create s Driven Cavity c Reynolds 1000 The DrivenCavity study directory is created containing the sub directories underlined DrivenCavity Study director si TRE a ynolds1000 Figure 3 1 Study directory structure Initially the MESH and POST sub directories are both empty By default when run from a case directory in this example Reynolds1000 Code_Saturne is set up to look for the mesh file for the case in the MESH directory The POST directory could contain post processing routines if required Upon creation the case Reynolds1000 contains by default the sub directories underlined and files s D Reynolds1000 case directory DATA RESU SCRIPTS SR Sd i 1_d r _ L REFERENCE SaturneGUI Runcase REFERENCE EXAMPLES Figure 3 2 Case directory and file structure The meaning of the different directories and files is recalled here briefly For detailed information please refer to the Code _Saturne user manual
36. isplay Mode and Shading Likewise Change background may also be accessed from the same drop down menu to change the background colour of the OCC viewer to light blue as in the figures At this point the cavity object is complete and could be meshed straight away However since the box has been created as a whole entity it would then neither be possible in the mesher to specify different meshing characteristics for the X Y and Z directions nor to identify the 6 external surfaces as boundaries for the Code_Saturne calculations Before meshing it is then necessary to create and identify these elements In the next step you will automatically subdivide the Cavity object in its constituting Faces and Edges using the powerful SALOME Geometry Explode utility With the Cavity object selected in the Object Browser in the left hand column in the top menu bar click on New Entity gt Explode to access the sub shape menu By using the Apply action at the bottom at the menu as opposed to Apply and Close you will be able to first create the faces and then the edges without leaving the sub shape pop up The faces are created first as shown in Fig 4 5 below aE Applications Places System GG AS 6 35 PM SALOME 6 3 1 Cavity Bo EPrFI Tina PITITICRITELCISETAILIT CPI INIT FILO CNG rie sue File Edit View New Entity Operations Repair Measures Tools Window Help Di OCC scene 1
37. ity_mesh mesh object is created first by selecting Mesh gt Create mesh in the main menu bar As shown in Fig 4 11 below in the Create mesh pop up menu type Cavity_mesh for the Name and select Cavity as the Geometry object by left clicking on it in the Object Browser 4 Applications Places System Saas Ss 703m ox Ble Ede Yew Mesh Controls Modificaton Measurements Jools Window Help PCI rund d bdbda dI dI Prersd4NXKpPrZdDk scena l vewerl VTK scene 1 wewerl D PhASOSVIsc omMans Pele ronsar ame Geometry m H Facet eg Face 2 pg Face 3 p g Face 4 Face 5 p MH Face 6 ii Edge 1 Create mesh i Edge_2 ame Cavity_me F Edge 3 E Edge_4 Geometry Oy i Edge 5 i Edge 6 Ps Edge 7 30 20 10 00 i Edge_8 Edge 9 Algorithm Hexahedr on th gk i Edge_10 bj g Edgell eres a a z Edge 12 i Sationary ceri ena ml a Si p Symmetry_pi Shdng_w Assagn a set of hypotheses i x edges b 7 Y edges Apply and Close apy qose Help Z edge L fs la Python Console Sai Python 2 6 6 r266 84292 Apr 26 2011 11 59 41 GCC 3 4 6 20060404 Red Hat 3 4 6 9 on linux2 type help to get general information on environment gt gt gt e B nxe wc 5 matn nara F READM E Code S fl pas Runsalo The GIMP ef Layer se T tnia3 listing r SALOME LJ g Figure 4 11 Creation of the main mesh
38. lculation Figure 4 33 Batch calculation settings Save the case and press the Start calculation button to run Code_Saturne 4 6 Running and Analysing the Simulation Upon firing the Code Saturne run from the GUI confirmation that Code_Saturne is running code_saturne is running appears in a pop up panel named after the time of the run This is followed by further messages indicating what stage the calculation is in from Preparing calculation data to Saving calculation results Wait for the calculations to complete and enter the Reynolds1000 RESU directory or open its contents via a browser to inspect its contents Explanations of the meaning and purpose of the different output files and directories resulting from a run are available in the Code_Saturne Users Guide 3 and are not repeated here Instead we highlight individual items which relate to this specific run and how the output information should always be used in order to analyse a calculation The RESU directory now contains a new directory named after the date and time at which the calculation was started expressed on a 24 hours clock in the format YearMonthDay HourMinutes In this latter directory note in particular e the profile files XVel YaxisCenterLine and YVel_XaxisCenterLine written in dat format e the listing file e the monitoring and postprocessing directories With your text editor
39. lick on the Line Chart View button and prepare the line plots starting with the pressure data Make the data visible for that file by clicking on the eye symbol next to the file name in the Pipeline Browser Click on the Display tab and set Attribute Mode to Row Data In the X Axis Data category select Use Data Array and choose iteration as the abscissa In the Line Series category unselect the iteration and vtkOriginallndices variables The variables 1 2 3 and 4 representing the pressure at each iteration at the four monitoring points you specified should be selected and the graphs of their evolution as a function of the number of iterations time steps should now be displayed in the view window For clarity change the legend for each variable In the Line Series category left click on the row for variable 1 to select it Left click again on the name of that variable in the Legend Name column to edit it Change the name of each variable to Pressure 1 Pressure 2 Pressure 3 and Pressure 4 Fig 4 37a TPropartiesa Display information Layout 18 Display og ESEJ ED a o AdMlMVlLlLLLLV _LLLV vMM Attribute Mode E Row Data gt 0 25 v View Settings x X Axis Data General Axis Title Left Axis Use Array Index From Y Axis Data 02 Bottom Axi
40. mas with increased accuracy 5 References 1 www salome platform org 2 Code_Saturne a Finite Volume Code for the Computation of Turbulent Incompressible Flows Industrial Applications International Journal on Finite Volumes Vol 1 2004 3 www code saturne org gt eDF 4 U Ghia K N Ghia and C T Shin High Re solutions for incompressible flow using the Navier Stokes equations and a multigrid method Journal of Comp Phys Vol 48 pp 387 411 1982 g eDF Appendix A Reference Data from 4 To make it easier to replicate the comparative plots of the Code _Saturne and reference results the data from 4 Tables and II at Re 1000 is reproduced in Table A 1 below The reference results listed in 4 were obtained on a fine 129x129 mesh Y Ux X Uy m m s m m s 1 00000 1 00000 1 00000 0 00000 0 97660 0 65928 0 96880 0 21388 0 96880 0 57492 0 96090 0 27669 0 96090 0 51117 0 95310 0 33714 0 95310 0 46604 0 94530 0 39188 0 85160 0 33304 0 90630 0 51550 0 73440 0 18719 0 85940 0 42665 0 61720 0 05702 0 80470 0 31966 0 50000 0 06080 0 50000 0 02526 0 45310 0 10648 0 23440 0 32235 0 28130 0 27805 0 22660 0 33075 0 17190 0 38289 0 15630 0 37095 0 10160 0 29730 0 09380 0 32627 0 07030 0 22220 0 07810 0 30353 0 06250 0 20196 0 07030 0 29012 0 05470 0 18109 0 06250 0 27485 0 00000 0 00000 0 00000 0 00000 Table A 1 X velocity versus Y at the vertical mid plane and Y velocity v
41. n of iteration Finally verify that the RESULTS case file containing all the mesh and output variables information for post processing has been output in the postprocessing directory Having validated the calculation itself you can now proceed to examining and post processing the results by returning to the SALOME platform 4 7 Post processing the Results In SALOME select ParaViS from the drop down module selector in the top menu bar The name of the module will add itself to the Object Browser list and the ParaView specific panels and menus will be activated including a new ParaView scene viewer window Before loading the run data in ParaView modify the default colour schemes To visualise scenes on a white background which is advantageous for printing change the default settings for ParaView by clicking on File gt Preferences in the top menu For ParaViS in the ParaView Settings tab change the colours to black for the foreground and text white for the background and grey for the surfaces as shown in Fig 4 35 below Press Apply to enforce the new settings and OK to validate your selection when you are satisfied with the changes x E za Preferences ParaView Settings ParaVis Settings Foreground Color O Background Color Surface Color Text Color Selection Color Edge Color Choose Palette Reset to Default Figure 4 35 Setting the colour p
42. o analysing the end results and comparing them with available data Specifically you will e Create a computational domain with SALOME using available shapes and groups e Create an hexahedral mesh with different mesh refinement in the X Y and Z directions with SALOME e Setup a steady state viscous laminar isothermal constant properties fluid CFD simulation with non slip walls a moving wall and symmetry planes with the Code_Saturne GUI and using the SALOME mesh e Control and run the Code_Saturne simulation from the Code_Saturne GUI e Examine the Code_Saturne output and results files including data along specified profiles and at monitoring points e Analyse and visualise the results with the SALOME GUI 4 2 Case Description A viscous fluid is contained in a box or cavity All the walls of the cavity are stationary but for one wall which is sliding in its plane and sets the fluid in motion inside the box through entrainment For the purpose of this example the cavity is rectangular two dimensional and the top wall of the cavity slides from left to right as illustrated in Fig 4 1 below x L Figure 4 1 Schematic of the 2D Lid Driven Cavity Variants of this case and numerical results are also described in 4 4 2 1 Geometry The cavity is a square of length L 1 0m 4 2 2 Fluid Properties The fluid is given the properties listed in Table 4 1 below g eDF Property Value Units Density p 1 0 kg m Viscosit
43. object The main mesh object holds the global characteristics of the Cavity mesh For the volume in the 3D tab choose Hexahedron i j k All the external surfaces of the Cavity will be meshed similarly therefore a global setup is applied for the entire mesh via this pop up menu by clicking on the 2D tab and selecting Quadrangle Mapping These two selections will result in a block structured mesh with an i j k matrix structure This requires identical discretisations along all the edges aligned along the same directions If we wanted the discretisation to be the same along all the directions for example 15 sub divisions along the X Y and Z edges the 1D tab could be selected and this unique discretisation specified However here we need to be able at least to specify the Z direction independenily of the two others to create a 3D domain which is one cell deep Therefore the edge discretisations will be specified separately using sub meshes The sub mesh defining the meshing characteristics in the X direction is specified first Right click on Cavity_mesh in the Object Selector and select Create sub mesh Alternatively with Cavity_mesh selected highlighted in the Object Browser the sub meshes can be created from Mesh or the short cut icon in the main menu bar This activates the Create sub mesh pop up menu in the VTK scene viewer as shown in Fig 4 12 below 4 A
44. of the computational domain and then mesh this domain Installation of this tool is described in Tutorial I Part Code _ Saturne is a 3D code and therefore the computational domain will be created as a 3D box aligned with the X Y and Z directions However as we are only interested in 2D modelling and the flow motion in the X Y plane the box will be designed to be thin and contain only one computational cell in the Z direction Start SALOME from within the study directory here directory DrivenCavity Gg te 2 4 4 1 Geometry Upon starting SALOME you are presented with a blank screen topped by the main menu bar The menu bar contains drop down menu topics and short cut icons for direct access to some of the menu selections For detailed information about SALOME please refer to SALOME s manuals and documentation 1 First the current SALOME file is saved by accessing File gt Save For this tutorial we choose the file name Cavity Fig 4 1 The file Cavity hdf will be created in directory DrivenCavity O sepicaioni Paces sym AGAS sssm 3 Sik SALONES 5 gag mat inata DI jaea cod WE pasrrr runs ee met ar Layer Salo mc inunc bla F terror DE 1tsting Sabo e scree SCI Figure 4 1 Saving the SALOME file It is advisable to save the file at regular intervals during this tutorial and preferably before and following all signif
45. pplications Places System DISSI gt 7iom amp SALOME 6 3 1 Cavity oix Ble Ede Yew Mesh Comtrois Modific Measurements Jools Window Help Gaex ae gt Hak oP 06b6d4 08008 VYYVV aga dRe DL g zj OCC scene wewerl VIK scene wewer l z DOPLPrDLITOS CHOUTE oo Create sub mesh FF Name X _drscretisation ala Number of Segments 50 j aj j Type of distribetion Equidistant distribution cash 5Sa z EI J ad stance uep Apply and Gose Apply J Close Help fs x Python Console Sal Python 2 6 6 r266 84292 Apr 26 2011 11 59 41 GCC 3 4 6 20060404 Red Hat 3 4 6 9 on linux2 type help to get general information on environment gt gt gt ell naso j matb I E natroc E TREADM E code s I pas Runsa The GIMP Layer alcutat ncase bia3 pising SALOME Gal Figure 4 12 Creation of the X mesh sub mesh eDF In the name field enter X_mesh The Cavity_mesh should already be selected in the Mesh field If not select it by clicking on Cavity mesh in the Object Browser Next pick X_edges for the Geometry field which stores the Geometry Objects the sub mesh will apply to Selecting an edge group for the Geometry automatically deactivates the 3D and 2D tabs in the Algorithm menu Select Wire discretisation in the drop down Algorithm menu and press on the gear button next
46. ps of faces which were created previously in the Geometry Right click on Cavity_mesh in the Object Selector and select Create Group to create containers of mesh elements The Create Group pop menu is activated The group of mesh faces for the Stationary_walls boundary is created first As shown in Fig 4 15 below in the Create Group pop up menu choose Face for the element type Ensure that Cavity_mesh has been selected for the mesh and do not modify the Name for now amp Applications Paces system GBDAD rem SALOME 6 3 1 Cavity ox Ble Ede Yew Mesh Controls Modification Measurements Jools Window Help SALOME 5 Dax ae f salse 46842 00809 EA ANE PVIVSd4d dwevadba ni OCC scene 1 wewer aU ph Aes Elementi Type J Mode _ Edge Face _ Volume Name Stationary _wals Group type J Standalone group Group on geometry Geometneal Object P Stabonary_walts 5 Color group color BI a Apply 20d Cose Apply Jose Help Python Consol Mal Python 2 6 6 r266 84292 Apr 26 2011 11 59 41 GCC 3 4 6 20060404 Red Hat 3 4 6 9 on linux2 type help to get general information on environment gt gt gt le I na wc man i I nat roc W READM E code s W basne E RunSalo The GIMP er Layers Calcutat BE fruncaset T bia3 C i listing SALOME LEC OS g Fig
47. references for ParaView The data to post process can now be imported in ParaView First you are going to load the monitoring point data to validate that a stable steady state solution has been obtained From the top menu bar select File gt Open ParaView File In the Open File pop up panel navigate to the monitoring sub directory and select three files The multiple selection is performed by holding the Ctrl key down as you select the files Select probes Pressure csv probes _VelocityX csv and probes VelocityY csv Close the panel by clicking Ok The three sets of data are now displayed under their file name in the Pipeline Browser For each file press Apply to load the data By default the data is visualised in tabular form in the ParaView scene viewer Close the View by clicking the cross button at the top right hand corner of the view The data view is now replaced by a Create View menu at the centre of the view pane Fig 4 36 2 eDF Layout 1 MmIB JO 6 al Kase Create View 2D View 3D View 3D View Comparative Bar Chart View Bar Chart View Comparative Eye Dome Lighting Line Chart View Line Chart View Comparative Parallel Coordinates View Plot Matrix View Spreadsheet View Figure 4 36 ParaView Create View menu C
48. rnatively use the Box icon short cut on the menu bar A Box Construction pop up menu is then activated as shown in Fig 4 3 below q eDF amp Applications Places System es 6 02PM File Edit View New Entity Operations Repair Measures Tools Window Help SALONE OLIV DX 9800464 no RADO BAGO BH gt U gt gt sr L OCC scene l viewer 1 So phLASPBVAccGQe wMeaae Dba XD Bom ef bject E EE Apply and Close Apply i Close Help Figure 4 3 Box construction menu In this menu choose the second method of Box construction which makes it possible to build a prismatic box attached to the origin by defining its three dimensions The default name is changed to Cavity and the dimensions in the X Y and Z directions are specified according to the problem definition in Section 4 2 The resulting Cavity object is shown in Figures 4 4a b below as wireframe in Fig 4 4a and after applying shading in Fig 4 4b Bla Er pea Mem een G m hear Meares we N SALAMA A E x amp amp Ser ee s cea boel seort Python 26 6 1266 84292 Apr 26 2011 1155 41 GOC 3 4 6 20060404 Red Hat 3 4 6 91 on trus type heip to get general information on environment gt gt gt Figure 4 4a b Wireframe left and Shading right display mo As shown in Fig 4 4b to change the Display Mode to Shading right click in the scene viewer to open the drop down menu then select D
49. ry regions double click the cell in the Selection area column in order to identify the boundary region in the mesh file With the cursor in the cell input the exact name of the boundary in the mesh file i e Stationary_walls The second set of boundaries is the symmetry planes which are used to enforce the 2D nature of the problem In the second row double click on Wall in the Nature column to activate the drop down menu of boundary types Choose Symmetry and release the menu In the Selection criteria cell input the name of the boundary in the mesh file i e Symmetry_planes In the third row of the table in the Selection criteria column input the name of the sliding wall boundary in the mesh file e Sliding wall Note that it is best to press enter after typing in the name of the region to ensure that it is properly recorded by the GUI eDF The boundaries and their global types are now defined as shown in Fig 4 25 below Definition of boundary regions Selection criteria BC_1 1 Wall Stationary_walls Bc_ 2 2 Symmetry Symmetry_planes Bc3 3 wall Sliding_wall Add Delete Add from Preprocessor listing Import groups and references from Preprocessor listing El Figure 4 25 Boundary definition Having defined their type the exact characteristics of the boundaries must be further specified Click on the Boundary conditions sub folder which presents the list o
50. s me Iteration fo Layout Use Data Array iteration gt usa gt Right Axis Font Arial 12 bold Set Font Line Series 0 15 Top Axis Variable Legend Name i i 9 Color Set Color iteration iteration ee v 1 2 50000e 01 5 00000e 01 0 00000e 00 Pressure 1 0 1 v 2 5 00000e 01 2 50000e 01 0 00000e 00 Pressure 2 3 5 00000e 01 7 50000e 01 0 00000e 00 Pressure 3 4 7 50000e 01 5 00000e 01 0 00000e 00 Pressure 4 ___vtkOriginalindices H vtkoriginalindices Lal D E n 5 a a n a variables legend b axis titles Figure 4 37a b Specification of line plot s legend and axes In the view window s tool bar underneath the window tab click on the Edit View Options button to bring up the View Settings pop up panel Change the Bottom Axis title to Iteration and the Left Axis title to Pressure Pa Fig 4 37b The graph shows that the pressure at the four monitoring points becomes constant after about 100 iterations Fig 4 38 Pressure 1 Pressure 2 Pressure 3 Pressure 4 g 4 s 8 g a 200 Iteration Figure 4 38 Pressure at the four monitoring points as a function of iteration eDF Repeat the same operation for the remaining velocity files For both files change the left axis title to Velocity m s For the X velocity change the variable names to X Vel where i 1 2 3 and
51. the file will be saved in the DATA directory Do not change this setting Press Save You can now proceed with setting up the case in the top down order of the folders in the left hand column of the GUI Press on Calculation Environment to open the folder and select Meshes Selection in order to specify the mesh file which will be used for these calculations In the Meshes tab for Mesh import Import meshes is already selected by default The Local mesh directory should already be pointing to the MESH directory for the study and where the mesh file had been exported to from SALOME Initially the List of meshes table is empty Click on the sign button below the table and a popup menu will show the content of the local mesh directory here MESH from which the mesh file can be selected Select the Cavity_mesh med file previously exported from SALOME at the end of the meshing process and press Open The file name will then be added to the list of meshes Fig 4 19 Meshes Periodic Boundaries Mesh import Import meshes Use existing mesh input Local mesh directory optional mesto Cf List of meshes Cavity_mesh med MED 1 O Figure 4 19 Selecting the mesh file for the calculations No further input is necessary as the faces do not require reorientation joining or sub dividing and there are no periodic boundaries to be concerned with
52. ualise the streamlines coloured by velocity magnitude on top of the computational mesh Fig 4 46 Velocity Magnitude 847118 0 8 0 6 0 4 0 2 2 14e 6 Figure 4 46 Stieamiines coloured l by velocity magnitude superimposed on the mesh G gt eDF In addition to the general circular motion which had been inferred from the contour plots of velocity components the streamlines now reveal two recirculation pockets in the bottom corners of the Cavity To further compare the calculated data with the available data from 4 create line plots of the X and Y velocities along the Y axis and X axis profiles which were set in the Code_Saturne GUI Using the menu File gt Open ParaView File import both the XVel YaxisCentreLine csv and the YVelXaxisCentreLine csv files To read in the data and ensure that the velocities are correctly interpreted as real numbers by ParaView in the Properties tab define the Field Delimiter Characters as a blank space followed by a comma Also select Merge Consecutive Delimiters Fig 4 47 Properties Display Information p Properties DRE Reset Delete Y Detect Numeric Columns Use String Delimiter Have Headers Field Delimiter Characters Merge Consecutive Delimiters Figure 4 47 Properties specification for the velocity profiles Go to the Information tab and verify that all the data arrays are read in as double The
53. ure 4 15 Creation of the mesh face group Stationary_walls In Group Type choose Group on geometry This will automatically restrict the choice to already available groups on the Cavity geometry For Geometry Object left click on Stationary_walls in the Geometry part of the Object Chooser By default the mesh face group is automatically renamed with the name of the Geometry Object selected To help visualisation the colour of this group of faces is switched to black Press Apply and repeat these operations to create the Symmetry plane and Sliding wall groups of faces choosing a different colour for each group When the last group has been defined press Apply and Close to leave the pop up menu The groups containing the boundary faces are now defined and may be visualised in the VTK scene viewer together or individually by selecting the groups of mesh faces in the Object Browser For example the Stationary_walls group is shown in Fig 4 16a and all the groups are visualised in Fig eDF 4 16b Note that the names of the groups which have been selected appear in the top right corner of the viewer in the colour scheme chosen for the group Figure 4 16a b Visualisation of the Stationary _ wall group I left and all the groups right The mesh is now ready to be exported in a separate file which can be read in by Co
54. viewer 1 Zie oD rhea eevOoceUie Mega x Sub Shapes Selection Python 2 6 6 r266 84292 Apr 26 2011 11 59 41 GCC 3 4 6 20060404 Red Hat 3 4 6 9 on linux2 type help to get general information on environment gt gt gt _ TT__ _ Tm Figure 4 5 Selecting face sub shapes in to Explode the Cavity object Check that the Main Object is the Cavity and select Type Face in the drop down selector Press Apply to explode the box in its constituting faces Do not close the sub shape menu Next select Edge in the drop down selector and press Apply and Close to create the edges and leave the sub shape menu The Cavity object in the object browser should now list all the faces and edges as shown in Fig 4 6 below amp Applications Places System Se BAS SALOME 6 3 1 Cavity File Edit View New Entity Operations Repair Measures Tools Window Help SALIRE 102 Xda bero sla sep OSIN datu 98200450 BHED BAGO SH gt ja Object Browser DZ OCC scene 1 viewer 1 2 DEt AIB eoq mla ga a Ee 9099899988 Python 2 6 6 r266 84292 Apr 26 2011 11 59 41 GCC 3 4 6 20060404 Red Hat 3 4 6 9 on linux2 type help to get general information on environment gt gt gt ii COSTOSO IM cove ML soore JM runsa woe w a lioness es tee ER Je _ Figure 4 6 Cavity sub divided in all its faces and edges
55. y u 10 Pa s Table 4 1 Fluid Properties 4 2 3 Boundary Conditions The problem is considered to be isothermal and the domain is fully enclosed by impermeable non slip walls This means that exactly at the surface of the walls the fluid inside the box attaches to the walls and has exactly the same velocity as the walls Therefore the problem is fully defined by specifying the velocity of the walls Table 4 2 The side and bottom walls are stationary The top wall slides in the positive X direction at a speed of 1 0m s Velocity component m s Surface Vx Vy Wi 0 0 0 0 Wb 0 0 0 0 W 0 0 0 0 Wi 1 0 0 0 Table 4 2 Wall velocities 4 2 4 Flow Regime The flow Reynolds number is evaluated to determine whether the flow is in the laminar or turbulent regime The Reynolds number is calculated based on the lid velocity the box dimensions and the fluid properties For this case the fluid properties and lid velocity have been chosen so that Re PEG 1000 u indicating that the problem is in the laminar flow regime 4 3 Creating the Code_Saturne case The DrivenCavity study and Reynolds1000 case are created by following the instructions in Part of this tutorial The next sections describe how to setup and run the lid driven cavity simulations for a flow Reynolds number of 1000 4 4 Creating the Computational Domain The SALOME platform is used first to create the geometry of the cavity which defines the bounds
Download Pdf Manuals
Related Search
Related Contents
catálogo pro control Princess Nice Price Hand Mixer Pelican 2670 User's Manual OPERADOR Y SEGURID A D Samsung XL20 Manual de utilizare Desa S36 User's Manual OMEGA-CARLINK-SMS2 install guide ES.indd User Manual - Version 6.6 Copyright © All rights reserved.
Failed to retrieve file