0% encontró este documento útil (0 votos)
73 vistas46 páginas

Unsteady Compressible Tutorial

Tutorial flujo compresible ANSYS

Cargado por

AGonzalez
Derechos de autor
© All Rights Reserved
Nos tomamos en serio los derechos de los contenidos. Si sospechas que se trata de tu contenido, reclámalo aquí.
Formatos disponibles
Descarga como PDF o lee en línea desde Scribd
0% encontró este documento útil (0 votos)
73 vistas46 páginas

Unsteady Compressible Tutorial

Tutorial flujo compresible ANSYS

Cargado por

AGonzalez
Derechos de autor
© All Rights Reserved
Nos tomamos en serio los derechos de los contenidos. Si sospechas que se trata de tu contenido, reclámalo aquí.
Formatos disponibles
Descarga como PDF o lee en línea desde Scribd
Chapter 6: Modeling Transient Compressible Flow This tutorial is divided into the following sections [Link] [Link] [Link] Description [Link] and Solution [Link] [Link] Improvements 6.1. Introduction In this tutorial, ANSYS Fluent’s density-based implicit solver is used to predict the time-dependent flow through a two-dimensional nozzle. As an initial condition for the transient problem, a steady-state solution is generated to provide the initial values for the mass flow rate at the nozzle exit. This tutorial demonstrates how to do the following: + Calculate a steady-state solution (using the density-based implicit solver) as an initial condition for a transient flow prediction, + Define a transient boundary condition using a user-defined function (UDF). + Use dynamic mesh adaption for both steady-state and transient flows. + Calculate a transient solution using the second-order implicit transient formulation and the density-based implicit solver. + Create an animation of the transient flow using ANSYS Fluent's transient solution animation feature. 6.2. Prerequisites This tutorial is written with the assumption that you have completed one or more of the introductory tutorials found in this manual: + Introduction to Using ANSYS Fluent in ANSYS Workbench: Fluid Flow and Heat Transfer in a Mixing El bow (p.1) + Parametric Analysis in ANSYS Workbench Using ANSYS Fluent (p.73) + Introduction to Using ANSYS Fluent: Fluid Flow and Heat Transfer in a Mixing Elbow (p. 121) and that you are familiar with the ANSYS Fluent tree and ribbon structure. Some steps in the setup and solution procedure will not be shown explicitly Tae TTR I gee CORT OPTRA a COMTARMTAT INST TOR “SANSTS nc ands sabudiane ana atte: 287 Modeling Transient Compressible Flow 6.3. Problem Description ‘The geometry to be considered in this tutorial is shown in Figure 6.1: Problem Specification (p. 268). Flow through a simple nozzle is simulated as a 2D planar model. The nozzle has an inlet height of 0.2 m, and the nozzle contours have a sinusoidal shape that produces a 20% reduction in flow area. Symmetry allows only half of the nozzle to be modeled. Figure 6.1: Problem Specification ‘Symmetry Plane i > >| > “ae [Po > > | => > Pruct= 0.9 atm 0.7369 atm 6.4. Setup and Solution The following sections describe the setup and solution steps for this tutorial: [Link] 6.4.2. Reading and Checking the Mesh 6.43, Solver and Analysis Type 6.4.4. Models 6.4.5. Materials 6.46. Operating Conditions [Link] Conditions 6.48. Solution: Steady Flow 6.4.9, Enabling Time Dependence and Setting Transient Conditions 6.4.10. Specifying Solution Parameters for Transient Flow and Solving 64.11. Saving and Postprocessing Time-Dependent Data Sets 6.4.1. Preparation To prepare for running this tutorial: 1. Set up a working folder on the computer you will be using. 2. Go to the ANSYS Customer Portal, httpsi//[Link]/trait Note If you do not have a login, you can request one by clicking Customer Registration on the log in page. 3. Enter the name of this tutorial into the search bar. 4, Narrow the results by using the filter on the left side of the page. Tae TTR I gee CORT OPTRA a COMTARMTAT INST TOR 268 “SANSTS nc ands sabudiane ana atte: Setup and Solution a. Click ANSYS Fluent under Product. b. Click 18.0 under Version. 5. Select this tutorial from the list. the unsteady compressible [Link] link to download the input files. 7. Unzip the unsteady_compressible_R180. zip file you downloaded to your working folder. The files nozzle .msh and pexit..c can be found in the unsteady_compressible folder created after unzipping the file. 8, Use Fluent Launcher to start the 2D version of ANSYS Fluent. Fluent Launcher displays your Display Options preferences from the previous session. For mote information about the Fluent Launcher, see starting ANSYS Fluent using the Fluent Launcher in the Fluent Getting Started Guide. 9. Ensure that the Display Mesh After Reading and Workbench Color Scheme options are enabled. 10. Ensure that Serial is selected under Processing Options 11. Disable the Double Preci n option 6.4.2. Reading and Checking the Mesh 1. Read the mesh file nozzle -msh, [>= File + Read ~ Mesh... The mesh for the half of the geometry is displayed in the graphics window. 2. Check the mesh. [= setting Up Domain — Mesh — Check ANSYS Fluent will perform various checks on the mesh and will report the progress in the console. Ensure that the reported minimum volume is a positive number. 3. Verify that the mesh size is correct. [= setting Up Domain ~ Mesh ~ Scale Tae TTR I gee CORT OPTRA a COMTARMTAT INST TOR “SANSTS nc ands sabudiane ana atte: 269 Modeling Transient Compressible Flow Domain Extents scaing xmn (n) [or ymax (m) Jo, © ComertUnits O Specty Scaing Factors Yin (n) fo max (0) [poy Mesh Was Created In > tT __] Unscale Close the Seale Mesh dialog box. 4, Mitror the mesh across the centerline (Figure 6.2:2D Nozzle Mesh Display with Mirroring (p.271)). [= Viewing ~ Display ~ Views. Miror Planes [1/1] a. Select symmetry in the Mirror Planes selection list. b. Click Apply to refresh the display. close the Views dialog box. FETED SAS TR THEN CORI BOPTEGY BATCHES 20 “SANSYS cand ssn ana afte, Setup and Solution Figure 6.2: 2D Nozzle Mesh Display with Mirroring 6.4.3. Solver and Analysis Type 1. Select the solver settings. Setting Up Physics ~- Solver ~ Density-Based ‘Solver hie iit Velocity Formulaton — Qperating Conditions... © Steady © Pressure-Based @ Absolute © Transient ~@ Densty-Based Relative @ Reference Values... Planar a, Inthe Solver group of the Setting Up Physics tab, select Density-Based from the Type list. The density-based implicit solver is the solver of choice for compressible, transonic flows without significant regions of low-speed flow. In cases with significant low-speed flow regions, the pressure- based solver is preferred. Also, for transient cases with traveling shocks, the density-based explicit solver with explicit time stepping may be the most efficient. TGS TEO-E SAS TAITGR Tals pean and COMET ITOTRTOR ‘PANSY nc ands ubldoner onda. an Modeling Transient Compressible Flow b. Retain the default selection of Steady from the Time list. Note You will solve for the steady flow through the nozzle initially. n later steps, you will use these initial results as a starting point for a transient calculation. 2. For convenience, change the unit of measurement for pressure. The pressure for this problem is specified in atm, which is not the default unit in ANSYS Fluent. You must redefine the pressure unit as atm. [= setting Up Domain ~ Mesh ~ Units... (Bs —~—~—~S~—~S~stst:ts«s ‘Quantities Units ‘Set All to. oe = fost : nonce a fer density st padre ea pemeiae ag ea fairs : Can ees Dressre-egent aaee onset 7 Iseercy oo maton conantunt : lore a. Select pressure in the Quantities selection list Scroll down the list to find pressure. b. Select atm in the Units selection lst. c. Close the Set Units dialog box. 6.4.4. Models 1. Enable the energy equation. FE setup ~ Models ~ Energy & model ~ on FETED SAS TR THEN CORI BOPTEGY BATCHES 2m “OPANSYS ncanditssbdanes ara afte. 2. Select the k-omega SST turbulence model. E Generat 5-88 Models BP Multichase (OFF) RP Enercy (On) ca ca ca Te setup ~ Models ~ viscous & Model ~ ssT komega @ setup ae ‘(4-89 Discrete Phase (Off) 83 Acoustics (Off) co-Q} Materials © © Cell Zone Consitions IE Boundary Conditions BI Dynamic Mech @ Retorence Valves 3G Solution Inviscid Laminar Standard k-ensiion Reslizeble k-epsilon Standard k-omega SST k-omege other > Solution Methods 6.4.5. Materials 1. Define the settings for air, the default fluid material, F& Setup — “'Materials - air ~ Create/Edit. Setup and Solution TEE TRO-E SAS “ana Papaya Tae TTR “OPANSYS nc ands subdanes ard af Modeling Transient Compressible Flow ee == el seat fle a a ‘Sungetceste) (“oes ] [Ge] (ee) a. Select ideal-gas from the Density drop-down list in the Properties group box, so that the ideal gas law is used to calculate density. Note ANSYS Fluent automatically enables the solution of the energy equation when the ideal gas law is used, in case you did not already enable it manually in the Energy dialog box. b. Retain the default values for all other properties. Click the Change/Create button to save your change. d. Close the Create/Edit Materials dialog box. 6.4.6. Operating Condit ions 1. Define the operating pressure. [== setting Up Physics -- Solver ~ Operating Condi FETED SAS TR THEN CORI BOPTEGY BATCHES 2 “OPANSYS ncanditssbdanes ara afte. Setup and Solution Pressure Operating Pressure (atm) = 8 Reference Pressure Location a. Enter 0 atm for Operating Pressure. b. Click OK to close the Operating Conditions dialog box. Since you have set the operating pressure to zero, you will specify the boundary condition inputs for pressure in terms of absolute pressures when you define them in the next step. Boundary condition inputs for pressure should always be relative to the value used for operating pressure. 6.4.7. Boundary Conditions 1. Define the boundary conditions for the nozzle inlet (inlet) JE: Boundary Conditions JE defautinteror (terior) jz a JE lower-val (wal) J: outlet (pressure-outiet) JE symmetry Gymmetry) Te Setup ~ Boundary Conditions ~ inlet (pressure-iniet) & eait.. FETED SAS TR THEN CORI BOPTEGY BATCHES “OPANSYS ncanditssbdanes ara afte. 27s Modeling Transient Compressible Flow Zone Name inlet warentum | Thermal [ Radaton [Spaces [ OPW [ Wukprase | Potental [ UDS | Gauge Total Pressure (atm) 0.9 Supetsonic/intial Gauge Pressure (atin) 0.7369 == Direction Specification Method Normal to Boundary. Zs Turbulance spedtaton Method (say and Vay Ra) Turbulent Intensity (%)15 CR Turbulent ViscostyRatio10 CY (ox) a. Enter 0.9 atm for Gauge Total Pressure. b. Enter 0.7369 atm for Supersonie/Initial Gauge Pressure. The inlet static pressure estimate is the mean pressure at the nozzle exit. This value will be used during the solution initialization phase to provide a guess for the nozzle velocity. Retain Intensity and Viscosity Ratio from the Specification Method drop-down list in the Turbulence group box. Enter 1. 5% for Turbulent Intensity. e. Retain the setting of 10 for Turbulent Viscosity Ratio. f. Click OK to close the Pressure Inlet dialog box. 2. Define the boundary conditions for the nozzle exit (outlet). F& Setup ~ Boundary Conditions ~ outlet (pressure-outlet) & eal... FETED SAS TR THEN CORI BOPTEGY BATCHES 216 “OPANSYS ncanditssbdanes ara afte. Setup and Solution Zone Nam outlet Worseneum | Thermal [ Radaton | Speces | Oem | Wukphase | Potental [U5 ] Backflow Reference Frame(Absolute 2 Gauge Pressure (atm) 0.7369 [constant a Backfow Direction Spectication Method [Normal to Boundary 2 [Fl average Pressure Specfication (F) Taget Wass Flow Rate Turbulence Specfication Nethod[Intensty and Viscosity Ratio. a Backflow Turbulent Intensty (9%) 1.5 ® Backflow Turbulent Viscosity Ratio 10 8 Acoustic Wave Modal a. Enter 0.7369 atm for Gauge Pressure b. Retain Intensity and Viscosity Ratio from the Specification Method drop-down list in the Turbulence group box, ©. Enter 1. 5% for Backflow Turbulent Intensity. d._ Retain the setting of 10 for Backflow Turbulent Viscosity Ratio. If substantial backflow occurs at the outlet, you may need to adjust the backflow values to levels close to the actual exit conditions, ©. Click OK to close the Pressure Outlet dialog box. 6.4.8. Solution: Steady Flow In this step, you will generate a steady-state flow solution that will be used as an initial condition for the time-dependent solution. 1. Define the solution parameters. [= solving — Solution ~ Methods... FETED SAS TR THEN CORI BOPTEGY BATCHES “OPANSYS ncanditssbdanes ara afte. a Modeling Transient Compressible Flow Solution Methods — ‘Satal Dacretization Gradient Least Squares Cel Based > Flow ‘Second Order Unwind 5 Turbulent Kinet Eneroy ‘Second Order Unwind = Speaific isipation Rate ‘Second Order Upwind a Transent Formulation NonTierative Tine Advancement Frozen Fux Formulation [Ei] Pseudo Transient [Fitch Order Term Relaxation oi ence Acceleration For Stretched Meshes a. Retain the default selection of Least Squares Cell Based from the Gradient drop-down list in the Spatial Discretization group box. b. Select Second Order Upwind from the Turbulent Kinetic Energy and Specific Dissipation Rate drop- down lists. Second-order discretization provides optimum accuracy. 2. Modify the Courant Number. [= solving — Controls - Control TEETH OE SASH Ts RTCA OPT ar COMA TOTO 2s “OPANSYS ncanditssbdanes ara afte. Setup and Solution Solution Contrals Courant Number ae — Under-Relaxation Facters Turbulent Kinetic Eneray 08 Specific Dissipation Rate 08 Turbulent Viscosity Default a. Enter 50 for the Courant Number. Note The default Courant number for the density-based implicit formulation is 5, For relat- ively simple problems, setting the Courant number to 10, 20, 100, or even higher value may be suitable and produce fast and stable convergence. However, if you en- counter convergence difficulties at the startup of the simulation of a properly set up problem, then you should consider setting the Courant number to its default value of 5. As the solution progresses, you can start to gradually increase the Courant number until the final convergence is reached, b. Retain the default values for the Under-Relaxation Factors. 3. Enable the plotting of residuals. [= solving — Reports ~ Residuals... Tae TTR I gee CORT OPTRA a COMTARMTAT INST TOR “SANSTS nc ands sabudiane ana atte: 279 Modeling Transient Compressible Flow Equations sil Tieritor + [contnuity [eno ywveloaty erations to Pot 1000 ei eneray a Residual Values Convergence Criterion lnormatze erations Wsaale ‘Compute Local Scale a. Ensure that Plot is enabled in the Options group box. b. Select none from the Convergence Criterion drop-down list ©. Click OK to close the Residual Monitors dialog box. 4. Create the surface report definition for mass flow rate at the flow exit. [== solving — Reports — Definitions — New — Surface Report — Mass Flow Rate FETED SAS TR THEN CORI BOPTEGY BATCHES 280 “SANSYS cand ssn ana afte, Setup and Solution ame Report Type mass flowrate_out Options Custom Vectors Vectors of [per surface ¥ Average Over Custom Vectors E = Field Variable Report Fils [0/0] Pressure... S Static Pressure Surfacas Fiter Text default-interior inlet lowerwall Report Plots [0/0] symmetry Create Repot Fle [W) Report Plot Frequency 1 = Prnt to Console 1 create Output Parameter New Surface ~ ai] a. Entermass_flowrate_out for Name. b. Select outlet in the Surfaces selection list. jot and Print to Console. ©. Inthe Create group box, enable Report File, Report Note When Report File is enabled in the Surface Report Definition dialog box, the mass flow rate history will be written to a file. f you do not enable this option, the history information will be lost when you exit ANSYS Fluent. d. Click OK to close the Surface Report Definition dialog box. Tae TTR I gee CORT OPTRA a COMTARMTAT INST TOR “SANSTS nc ands sabudiane ana atte: 2s Modeling Transient Compressible Flow mass_flowrate_out-rplot and mass_flowrate_out-rfile are automatically generated by Fluent and appear in the tree (under Solution/Monitors/Report Plots and Solution/Monitors/Report Files, respectively) e. Modify the output file name. F& solution ~ Monitors ~- Report Files ~ mass_flowrate_out-rfile & eait.. ‘as_fowente_outme Avalable Report Definitons [0/0], Selected Report Definitions (0/1) ar me st eae : Cinwcane cal (Heb) i. Enternoz_ss. out for Output File Base Name. ii, Click OK to close the Edit Report Fil dialog box. 5. Save the case file (noz_ss.[Link]) [= Fite - wi 6. Initialize the solution. + Case. [= solving — initialization Methed » Hybrid — More Settings... ) Standard 5 ~ t=0 Reset DP Inttalize FETED SAS TR THEN CORI BOPTEGY BATCHES raz “OPANSYS ncanditssbdanes ara afte. a. Keep the Method at the default of Hybrid b. Click Ini ize. 7. Set up gradient adaption for dynamic mesh refinement, Setup and Solution You will enable dynamic adaption so that the solver periodically refines the mesh in the vicinity of the shocks as the iterations progress. The shocks are identified by their large pressure gradients. [== setting Up Domain ~- Adapt -> Mark/Adapt Cells ~ Gradient... seen nnEEEEEEEEEEEEEEEEEEEEEEEEEEEEE | Gradient Adaption Nethod curvature (© Gradient [iNormaize per Zone )Is0-Value Normalization Standard @ sale Normalize Manage, Dynamic WZidyanic Interval Gradients of an fPesre, ax 0 CCoarsen Threshold 0 Refine Threshold 02 0.7 a. Select Gradient from the Meth od group box. The mesh adaption criterion can either be the gradient or the curvature (second gradient). Because strong shocks occur inside the nozzle, the gradient is used as the adaption criterion. b. Select Seale from the Normalization group box. Mesh adaption can be controlled by the raw (or standard) value of the gradient, the scaled value (by its average in the domain), or the normalized value (by its maximum in the domain). For dynamic mesh adaption, it is recommended that you use either the scaled or normalized value because the raw values will probably change strongly during the computation, which would necessitate a read: Justment of the coarsen and refine thresholds. In this case, the scaled gradient is used. ¢. Enable Dynamic in the Dynamic group box. d. Enter 100 for the Interval For steady-state flows, itis sufficient to only seldomly adapt the mesh—in this case an interval of 100 iterations is chosen. For time-dependent flows, a considerably smaller interval must be used. e, Retain the default selection of Pressure... and Static Pressure from the Gradients of drop-down lists. f Enter 0.3 for Coarsen Threshold. Ta ae Age “SANSTS nc ands sabudiane ana atte: 283 Modeling Transient Compressible Flow g. Enter 0.7 for Refine Threshold. As the refined regions of the mesh get larger, the coarsen and refine thresholds should get smaller A coarsen threshold of 0.3 and a refine threshold of 0.7 result in a ‘medium to “strong” mesh refine- ‘ment in combination with the scaled gradient. h. Click Apply to store the information i. Click the Controls... button to open the Mesh Adaption Controls dialog box. "Bil wesh adoption Contos Options Zones Fiter Text Min Cell Volume (m3) (W) Refine 0 @ Cearsen Min # of Cels 0 Max # of Cells 720000 vax Leva of Retne 2 cs Volume Weight 7 i. Retain the default selection of fluid in the Zones selection list. Enter 20000 for Max # of Cells. To restrict the mesh adaption, the maximum number of cells can be limited. If this limit is violated during the adaption, the coarsen and refine thresholds are adjusted to respect the maximum number of cells. Additional restrictions can be placed on the minimum cell volume, minimum number of cells, and maximum level of refinement. ili, Click OK to save your settings and close the Mesh Adaption Controls dialog box. j. Click Close to close the Gradient Adaption dialog box. 8. Start the calculation by requesting 500 iterations. [= solving — Run Calculation — Advanced... Tae TTR I gee CORT OPTRA a COMTARMTAT INST TOR 2a “SANSTS nc ands sabudiane ana atte: Setup and Solution Run Calculation Frevew Mesh Woton Number of erations Reporting Interval 00 1 iS Profle Update Interval OB GB sivonsteerng Data Fie Quantities... ] | AcousticSionals a. Enter 500 for Number of Iterations. b. Click Calculate to start the steady flow simulation. Figure 6.3: Mass Flow Rate History “150000 -16.9000 “17.9000 0 80 100 160 200 260 300 360 402 480 iteretion 9. Save the case and data files (noz_ss.[Link] and noz_ss.[Link]). TERETE SISA a BOB ad COATIERTTIOTATOR PANSY nc ands atid ord ahr Modeling Transient Compressible Flow [>= File - write ~ Case & Data... Note When you write the case and data files at the same time, it does not matter whether you specify the file name with a . cas or . dat extension, as both will be saved. 10. Click OK in the Question dialog box to overwrite the existing file. 11. Review a mesh that resulted from the dynamic adaption performed during the computation. ‘Results — Graphics -- Mesh % Edit. Ei Mesh Display Options Edge Type Einods | © al Sureces Fer Wi etaes Feature Eres © Outine (© Partitions Overset Shrnk Factor Feature Angle 0 20 (oume) (tata) (Newsufecae) Ensure that only the Edges option is enabled in the Options group box. b. Select Feature from the Edge Type list. Ensure that all of the items are selected from the Surfaces selection list Click Display and close the Mesh Display dialog box. The mesh after adaption is displayed in the graphics window (Figure 6.4: 2D Nozzle Mesh after ‘Adaption (p. 287) FETED SAS TR THEN CORI BOPTEGY BATCHES 286 “OPANSYS ncanditssbdanes ara afte. Setup and Solution Figure 6.4: 2D Nozzle Mesh after Adaption 0 jm) Zoom in using the middle mouse button to view aspects of your mesh Notice that the cells in the regions of high pressure gradients have been refined. 12. Display the steady flow contours of static pressure (Figure 6.5: Contours of Static Pressure (Steady Flow) (p.288)). Postprocessing ~ Graphics ~ Contours ~ Edit... TGS TEO-E SAS TAITGR Tals pean and COMET ITOTRTOR ‘PANSY nc ands ubldoner onda. 287 Modeling Transient Compressible Flow Options Contours of © Filed Pressure. IW)Node Values Static Pressure © Global Range (W auto Range db to Range Eidrew Profiles suraces Fitar Text Draw Mesh defoult interior inlet eee lowerwall |e snies | © smooth | | vrctey “Levels Setup 2a fi & New Surface + a, Enable Filled in the Options group box. b. Click Display and close the Contours dialog box. Figure 6.5: Contours of Static Pressure (Steady Flow) 5are0t 5a2e01 5.16001 501601 46001 ql om) FETED SAS TR THEN CORI BOPTEGY BATCHES a8 “SANSYS cand ssn ana afte, Setup and Solution The steady flow prediction in Figure 6.5: Contours of Static Pressure (Steady Flow (p. 288) shows the ex- pected pressure distribution, with low pressure near the nozzle throat. 13. Display the steady flow velocity vectors (Figure 6.6: Velocity Vectors Showing Recirculation (Steady Flow) (p. 290). [== postprocessing ~ Graphics ~ Vectors ~ Edit. Wautorange cok by [Auto sale © raw mesh Style Velocity Magnitude Ni Cop fengeletyas) Sele skp Sutfeces Fier Text SC Ostions Vectors of © Global Range [Velocity 50 0 Fl [aefauteinterior ae se, New Surface a. Enter 50 under Seale. b. Click Display and close the Vectors dialog box. The steady flow prediction shows the expected form, with a peak velocity of approximately 300 m/s through the nozzle. You can zoom in on the wall in the expansion region of the nozzle to view the recirculation of the flow as shown in Figure 6.6: Velocity Vectors Showing Recirculation (Steady Flow) (p. 290) FETED SAS TR THEN CORI BOPTEGY BATCHES “OPANSYS nc ands subdanes ard af Modeling Transient Compressible Flow Figure 6.6: Velocity Vectors Showing Recirculation (Steady Flow) 14. Check the mass flux balance. Important Although the mass flow rate history indicates that the solution is converged, you should also check the mass flux throughout the domain to ensure that mass is being conserved. = Postprocessing ~ Reports ~ Fluxes... a TED" ST RTOS POPE aT OTT OTR TOT 200 lincand te subsidiaries and aha Setup and Solution defaultinteror syeametty > Radiaton Heat Transfer Rete ET |16.10331527e33218 -soansesescor39 ‘Save Output Paremet Net Results (ke/s) -0.0003373777 a. Retain the default selection of Mass Flow Rate. b. Select inlet and outlet in the Boundaries selection list. . Click Compute and examine the values displayed in the dialog box. Important The net mass imbalance should be a small fraction (for example, 0.19%) of the total flux through the system. The imbalance is displayed in the lower right field under Net Results, f a significant imbalance occurs, you should decrease your residual tolerances by at least an order of magnitude and continue iterating, d. Close the Flux Reports dialog box. 6.4.9. Enabling Time Dependence and Setting Transient Condi jons In this step you will define a transient flow by specifying a transient pressure condition for the nozzle. 1 Enable a time-dependent flow calculation. [= setting Up Physics ~ Solver ~ Transient Read the user-defined function (pext .c),in preparation for defining the transient condition for the nozzle exit. The pressure at the outlet is defined as a wave-shaped profile, and is described by the following equation: Pal t)=0.12sin (at), where 1) Tae TTR I gee CORT OPTRA a COMTARMTAT INST TOR “SANSTS nc ands sabudiane ana atte: Modeling Transient Compressible Flow @ = circular frequency of transient pressure (rad/s) Payje = Mean exit pressure (atm) In this case, «o=2200 rad/s, and B,.,= 0.7369 atm. A user-defined function ( pexit .< ) has been written to define the equation (Equation 6.1 (p.291)) required for the pressure profile. Note To input the value of Equation 6.1 (p. 291) in the correct units, the function pexit.c has to be written in SI units. More details about user-defined functions can be found in the Fluent Customization Manual [F= User Defined - User Defined — Functions ~ Interpreted... (Bi interpreted UDF: Source Fle tame pent.c (©®P Command tame pp Stack Size = ‘10000 2 [iDspley Assembly Listing (luse contributed CFP a. Enter pexit.c for Source File Name. If the UDF source file is not in your working directory, then you must enter the entire directory path for Source File Name instead of just entering the file name. b. Click Interpret, The user-defined function has already been defined, but it must be compiled within ANSYS Fluent before it can be used in the solver. ©. Close the Interpreted UDFs dialog box. 3. Define the transient boundary conditions at the nozzle exit (outlet). ns ~ outlet 9 ea F& Setup - Boundary Condi Tae TTR I gee CORT OPTRA a COMTARMTAT INST TOR an “SANSTS nc ands sabudiane ana atte: Setup and Solution Zone Name outlet Worseneum | Thermal [ Radaton | Speces | Oem | Wukphase | Potental [U5 ] Backflow Reference Frame [Absolute * Gauge Pressure (atm) udf transient_pressure_+ Backfow Direction Specfication Method (Normal to Boundary [Fl average Pressure Specfication F Target Mass Flow Rate. Turbulence Specticaton Nethod{latenshyandl ices Ratio aaa) Backflow Turbulent Intensty (9%) 1.5 ® Backflow Turbulent Viscosity Ratio 10 8 Acoustic Wave Modal a. Select udf transient_pressure (the user-defined function) from the Gauge Pressure drop-down list b. Click OK to close the Pressure Outlet dialog box. 4. Update the gradient adaption parameters for the transient case. [== setting Up Domain — Adapt -+ Mark/Adapt Cells ~- Gradient... a. Enter 10 for Interval in the Dynamic group box. For the transient case, the mesh adaption will be done every 10 time steps. b. Enter 0.3 for Coarsen Threshold. ©. Enter 0.7 for Refine Threshold, The refine and coarsen thresholds have been changed during the steady-state computation to meet the limit of 20000 cells. Therefore, you must reset these parameters to their original values. d. Click Apply to store the values. e. Click Controls... to open the Mesh Adaption Controls dialog box. i. Enter 8000 for Min # of Cells. ii, Enter 30000 for Max # of Cells. FETED SAS TR THEN CORI BOPTEGY BATCHES “OPANSYS ncanditssbdanes ara afte. a Modeling Transient Compressible Flow You must increase the maximum number of cells to try to avoid readjustment of the coarsen and refine thresholds. Additionally, you must limit the minimum number of cells to 8000, because you should not have a coarse mesh during the computation (the current mesh has approximately 20000 cells). il, Click OK to close the Mesh Adaption Controls dialog box. f. Close the Gradient Adaption dialog box. 6.4.10. Specifying Solution Parameters for Transient Flow and Solving 1. Modify the mass_flowrate_out-rfile report file definition F& Solution - Monitors — Report Files ~ mass_flowrate_out-rfile & ait Name rrass_fowate_oucrie Ava Renae Dafne [03] ‘elected Reno: Defneons [0/1] detetime mas own out ow-ime patina = ‘uRDUE Fe Baca Name raz_uns.out Ful Fie Narre *\solution_files\\noz_ss.out Get Daa Ever 1 ©) (reste (WiPrme to censle @& a, Enter noz_uns. out for Output File Base Name. b. Select time-step from the Get Data Every drop-down list. G. Click OK to close the Edit Report File dialog box. 2. Modify the mass_flowrate_out-rplot report plot definition. F& Solution -- Monitors — Report Plots - mass_flowrate_out-rplot S eaic.. FETED SAS TR THEN CORI BOPTEGY BATCHES 2% “OPANSYS ncanditssbdanes ara afte. Setup and Solution Name mass fowate out-iot ‘vale Report Defntons (2/0) Selected Report Defincons [0/1] ass late out ptons Pt Window (= Gres) (ee) Get Data Every Pot Tee mass_fowate_oubspot axe Label inestep —] ‘ts Label Mass Flow Rate New) Eat TZ pine to console (Gx) (Gonce) (H20) a. For Get Data Every, retain the value of 1 and select time-step from the drop-down list. Because each time step requires 10 iterations, a smoother plot will be generated by plotting at every time step, b. Select time-step from the X-Axis Label drop-down list. Click OK to close the Edit Report File dialog box. 3. Save the transient solution case file (noz_uns.cas.g2), [F= File + write + Case. 4. Modify the plotting of residuals. [>= solving — Reports — Residuals... a. Ensure that Plot is enabled in the Options group box. b. Ensure none is selected from the Convergence Criterion drop-down list. c. Set the Iterations to Plot to 100. d._ Click OK to close the Residual Monitors dialog box. 5. Define the time step parameters. FETED SAS TR THEN CORI BOPTEGY BATCHES “OPANSYS ncanditssbdanes ara afte. 205 Modeling Transient Compressible Flow The selection of the time step is critical for accurate time-dependent flow predictions. Using a time step of 2.85596 x 10° seconds, 100 time steps are required for one pressure cycle. The pressure cycle begins and ends with the inital pressure at the nozzle exit. [= solving — Run Calculation — Advanced Run Calculation Check Case... Pret ‘Time Stepping Method Time Step Size (5) Mash Motion... Fed =] 2855965 8 Settings. Number of Time Steps 600 = options © extrapolate variables: Data Sampling for Time Statistics Sampling Intenal i Sarroling Optons. Time Sampled (5) [0 sold Time Step User Spectied © Automat ax Iteratons/ Time Step Reporting Interval 30 ai + Profle Update Interval 1 = Data Fie Quantities...) | Acou tic Signals. Help a. Enter2.85596e-5 s for Time Step Size. b. Enter 600 for Number of Time Steps. ©. Enter 10 for Max Iterations/Time Step, d. Click Caleulate to start the transient simulation By requesting 600 time steps, you are asking ANSYS Fluent to compute six pressure cycles. The mass flow rate history is shown in Figure 6.7: Mass Flow Rate History (Transient Flow) (p. 297). Tae TTR I gee CORT OPTRA a COMTARMTAT INST TOR “SANSTS nc ands sabudiane ana atte: Setup and Solution Figure 6.7: Mass Flow Rate History (Transient Flow) 18.000 0 100 200400800600 time-step 6. Optionally, you can review the effect of dynamic mesh adaption performed during transient flow compu- tation as you did in steady-state flow case. 7. Save the transient case and data files (noz_uns.[Link] and noz_uns.dat.g2). ile Writ — Case & Data... 6.4.11. Saving and Postprocessing Time-Dependent Data Sets At this point, the solution has reached a time-periodic state. To study how the flow changes within a single pressure cycle, you will now continue the solution for 100 more time steps. You will use ANSYS Fluent’s solution animation feature to save contour plots of pressure and Mach number at each time step, and the utosave feature to save case and data files every 10 time steps. After the calculation is complete, you will use the solution animation playback feature to view the animated pressure and Mach number plots over time. 1. Request the saving of case and data files every 10 time steps. Solving ~ Acti + Autosave... TGS TEO-E SAS TAITGR Tals pean and COMET ITOTRTOR ‘PANSY nc ands ubldoner onda. 27 Modeling Transient Compressible Flow (Bawwe Save Date Fie Every (Time Steps) 10 2. Data File Quantities. Save Associated Case Files © OnWE Nodified © Esch Time Fie Storage Options i Retain Only the Most Recent Files Maximum Number of Data Fies [0 Only Assocated Case Fies are Retaned Fle Name ‘noz_anim.gz Brovise, Append Fle Name with (fimestap + a. Enter 10 for Save Data File Every. b. Select Each Time for Save Associated Case Files. ©. Retain the default selection of time-step from the Append File Name with drop-down list d. Enter noz_anim. gz for File Name. When ANSYS Fluent saves a file, it will append the time step value to the file name prefix ( noz_anim ), The standard extensions (.cas and . lat ) will also be appended. By adding the optional extension . 2 to the end of the file name, you instruct ANSYS Fluent to save the case and data files in compressed format. This will yield file names of the form noz_anim-[Link] and noz_anim-1-00€40. dat. gz , where 00640 is the time step number. 2. Click OK to close the Autosave dialog box. Tip If you have constraints on disk space, you can restrict the number of files saved by ANSYS Fluent by enabling the Retain Only the Most Recent Files option and setting the Maximum Number of Data Files to a nonzero number. Create an animation definition for the nozzle pressure contour plot. = solving — Acti 15 — Create ~ Solution Animations... Tae TTR I gee CORT OPTRA a COMTARMTAT INST TOR “SANSTS nc ands sabudiane ana atte: Setup and Solution Storage Directory fible/solution_files| Window Id 3 = Anson obec 8 residuals a. Enter pressure for the Name. b. Select Time Step for Record after every. The default value of 1 in the integer number entry box instructs ANSYS Fluent to update the animation sequence at every time step. Select In Memory from the Storage Type drop-down. The In Memory option is acceptable for a small 2D case such as this. For larger 2D or 3D cases, saving animation files with either the Metafile or PPM Image option is preferable, to avoid using too much of your machine's memory. d. Enter 3 for the Window Id. €. Click New Object and select Contours... from the drop-down list to open the associated dialog box. Tae TTR I gee CORT OPTRA a COMTARMTAT INST TOR “SANSTS nc ands sabudiane ana atte: 299 Modeling Transient Compressible Flow Contour Name contour-t Ostions ‘Contours of Fes Node values ‘Static Pressure 7 Global Range Elattorange, — MaLGtm) Wax (atm) [Wi Clp to Range 9-25 a Draw Profiles cugfaces Fiter Text Draw Mesh default-interior inlet lewerwall outlet symmetry olorng i. Select Pressure... and Static Pressure from the Contours of drop-down lists. ii. Ensure that Filled is enabled in the Options group box. ili, Disable Auto Range. iv. Enter 0.25 atm for Min and 1.25 atm for Max. v. Click Save/Display and close the Contours dialog box. FETED SAS TR THEN CORI BOPTEGY BATCHES 300 “OPANSYS ncanditssbdanes ara afte. Setup and Solution vi. Figure 6.8: Pressure Contours at t=0.017136 s Ensure contour-1 is selected in the Animation Object group box. 9. Click Save and close the Animation Definition dialog box. 3. Create an animation definition for the Mach number contour plot. [>= solving — Activities ~ Create ~ Solution Animations... TGS TEO-E SAS TAITGR Tals pean and COMET ITOTRTOR ‘PANSY nc ands ubldoner onda. 201 Modeling Transient Compressible Flow Storage Directory Gipiejsolution_fies| Window Id 4 = Anson obec 8 residuals contoured suré-mon-L-peet New Object | (Edit Object. Saxe) (Goss) (Fe) a. Enter mach-number for the Name. b. Select Time Step for Record after every. The default value of 1 in the integer number entry box instructs ANSYS Fluent to update the animation sequence at every time step. Ensure that In Memory is selected from the Storage Type drop-down. d. Enter 4 for the Window Id. @. Click New Object and select Contours... from the drop-down list to open the associated dialog box. i. Select Velos and Mach Number from the Contours of drop-down lists. ii. Ensure that Filled is enabled in the Options group box. ili, Disable Auto Range. iv, Enter 0.00 for Min and 1.30 for Max. v. Click Save/Display and close the Contours dialog box. Tae TTR I gee CORT OPTRA a COMTARMTAT INST TOR “SANSTS nc ands sabudiane ana atte: Setup and Solution vi. Figure 6.9: Mach Number Contours at t=0.017136 s seseot agent aqen1 325601 2enent 195001 40001 enea2 o.cnesn0 Ensure contour-2 is selected in the Animation Object group box. 9. Click Save and close the Animation Definition dialog box. 4. Continue the calculation by requesting 100 time steps. By requesting 100 time steps, you will march the solution through an additional 0.0028 seconds, or roughly one pressure cycle. With the autosave and animation features active (as defined previously), the case and data files will be saved approximately every 0.00028 seconds of the solution time; animation files will be saved every (0.000028 seconds of the solution time, [== solving — Run Calculation ~ Advanced... TGS TEO-E SAS TAITGR Tals pean and COMET ITOTRTOR ‘PANSY nc ands ubldoner onda. 303 Modeling Transient Compressible Flow Run Calculation Preven Weck Motion Time Stepping Method ‘Time Step Size (s) an =] [astieeos st) ® ‘Settings umber of Time Steps 300 I Oations [Llextrapoiate Variables [Floats Sampling for Time Statistics Ssmning Inverval b [Samia Options. i Max Tieratiors/Time Step _ Reporting Interval 0 1 &H ae Profle Update Interval 1 O08 Enter 100 for Number of Time Steps and click Calculate. When the calculation finishes, you will have ten pairs of case and data files and there will be 100 pairs of contour plots stored in memory. In the next few steps, you will play back the animation sequences and examine the results at several time steps after reading in pairs of newly saved case and data files. 5. Play the animation of the pressure contours. Te Results ~ Animations ~ Solution Animation Playback O edit. FETED SAS TR THEN CORI BOPTEGY BATCHES 308 “OPANSYS ncanditssbdanes ara afte. Setup and Solution ‘Animation Sequences roexstiiyone ee ee Per ae 8 ; Tal Frane Cellini Nee) Slow ReplaySpced Fast WriteMRecord Format [animatonFrames uy] Picture Onion. mech-sunber a. Retain the default selection of pressure in the Sequences selection list. Ensure that tab window 4 is open in the graphics window. b. Click the play button (the second from the right in the group of buttons in the Playback group box). ©. Close the Playback dialog box. Examples of pressure contours at t=0.017993 s (the 630th time step) and t=0.019135 s (the 670th time step) are shown in Figure 6.10: Pressure Contours at t=0.017993 s(p. 306) and Figure 6.11: Pressure Contours at t=0.019135 5 (p. 306). FETED SAS TR THEN CORI BOPTEGY BATCHES “OPANSYS ncanditssbdanes ara afte. 205 Modeling Transient Compressible Flow Figure 6.10: Pressure Contours at t=0.017993 s Figure 6.11: Pressure Contours at t=0.019135 5 FEE TET IG POPE an CONT TSTTOT 30s Inc ands ubsidanes and fates 6 Setup and Solution Ina similar manner to steps 4 and 5, select the appropriate active window and animation sequence name for the Mach number contours. Examples of Mach number contours at t= 0.017993 s and t=0.019135 s are shown in Figure 6.12: Mach ‘Number Contours at t=0.017993 s (p. 307) and Figure 6.13: Mach Number Contours at t=0.019135 s(p. 308). Figure 6.12: Mach Number Contours at t=0.017993 s o.cnesn0 FETED SAS TR THEN CORI BOPTEGY BATCHES “SANSYS cand ssn ana afte, Modeling Transient Compressible Flow Figure 6.13: Mach Number Contours at t=0.019135 s 7.46004 agent aqen1 325601 2enent 195001 40001 enea2 o.cnesn0 Tip ANSYS Fluent gives you the option of exporting an animation as an MPEG file or as a series of files in any of the hardcopy formats available in the Save Picture dialog box (including TIFF and PostScript) To save an MPEG file, select MPEG from the Write/Record Format drop-down list in the Playback dialog box and then click the Write button. The MPEG file will be saved in your working folder. You can view the MPEG movie using an MPEG player (for example, Win- dows Media Player or another MPEG movie player) To save a series of TIFF, PostScript, or other hardcopy files, select Picture Frames in the Write/Record Format drop-down list in the Playback dialog box. Click the Picture Op- tions... button to open the Save Picture dialog box and set the appropriate parameters for saving the hardcopy files. Click Apply in the Save Picture dialog box to save your modified settings. Click Save... to select a directory in which to save the files. In the Playback dialog box, click the Write button. ANSYS Fluent will replay the animation, saving each frame to a separate file in your working folder. If you want to view the solution animation in a later ANSYS Fluent session, you can select Animation Frames as the Write/Record Format and click Write. Warning Because the solution animation was stored in memory, it will be lost if you exit ANSYS Fluent without saving it in one of the formats described previously. Note FETED SAS TR THEN CORI BOPTEGY BATCHES “SANSYS cand ssn ana afte, Setup and Solution that only the animation-frame format can be read back into the Playback dialog box for display in a later ANSYS Fluent session. 7. Read the case and data files for the 660th time step (noz_anim-[Link] and noz_an- [Link]) into ANSYS Fluent. 8. Plot vectors at t=0.018849 s (Figure 6.14:Velocity Vectors at t=0.018849 s (p.310)) Postprocessing ~ Graphics ~* Vectors ~ Edit... Options Vectors of @ Gobel Range @ Auto Range Clip to Fange 00820 SS Fpawnesh — Vebaty Hagnitude + Min (m/s) Max (m/s) pul (o.35804 262.8595 ] arow Scale Skip Surfaces Filter Text so 50 defaul-interior [Vector Options...) [inlet meee (ustomvectos..) outer symmetry New Surface a. Ensure Auto Seale is enabled under Options. b. Enter 50 under Seale, ©. Enter 50 under Skip. d. Click Display and close the Vectors dialog box. FETED SAS TR THEN CORI BOPTEGY BATCHES “OPANSYS ncanditssbdanes ara afte. 309 Modeling Transient Compressible Flow Figure 6.14: Velocity Vectors at t=0.018849 s 118702 ozent rete eee zeit sare 2eseo1 135001 seen The transient flow prediction in Figure 6.14: Velocity Vectors at t=0.018849 s(p. 310) shows the expected form, with peak velocity of approximately 260 m/s through the nozzle at t=0.018849 seconds. 9. Ina similar manner to steps 7 and 8, read the case and data files saved for other time steps of interest and display the vectors. [Link] In this tutorial, you modeled the transient flow of air through a nozzle. In doing so, you learned how to: + generate a steady-state solution as an initial condition for the transient case. + set solution parameters for implicit time-stepping and apply a user-defined transient pressure profile at the outlet. + use mesh adaption to refine the mesh in areas with high pressure gradients to better capture the shocks. + automatically save solution information as the transient calculation proceeds + create and view solution animations of the transient flow. 6.6. Further Improvements This tutorial guides you through the steps to generate a second-order solution. You may be able to increase the accuracy of the solution even further by using an appropriate higher-order discretization scheme and by adapting the mesh further. Mesh adaption can also ensure that the solution is independ- FETED SAS TR THEN CORI BOPTEGY BATCHES no “SANSYS cand ssn ana afte, Further Improvements ent of the mesh. These steps are demonstrated in Introduction to Using ANSYS Fluent: Fluid Flow and Heat Transfer in a Mixing Elbow (p. 121). FETED SAS TR THEN CORI BOPTEGY BATCHES “SANSYS cand ssn ana afte, a FEE TET ah ‘a SECON inc and te subd and ah ad SATIRE ITOTTAIOR

También podría gustarte