+ All Categories
Home > Documents > Fluent - Tutorial - Dynamic Mesh - Projectile Moving Inside a Barrel

Fluent - Tutorial - Dynamic Mesh - Projectile Moving Inside a Barrel

Date post: 11-Mar-2015
Category:
Upload: gentman42
View: 2,130 times
Download: 77 times
Share this document with a friend
25
Tutorial: Projectile Moving Inside a Barrel Introduction The purpose of this tutorial is to illustrate how to set up and solve a problem using the following two features in FLUENT. Moving Deforming Mesh (MDM) using the layering algorithm. User-defined real gas law. The problem involves a projectile moving through a barrel and out of the muzzle. The flow is assumed to be inviscid. In this tutorial you will learn how to: Read a mesh file for performing an MDM calculation. Compile a UDF for the projectile motion and the Abel-Nobel real gas law. Set up the moving zones and hook the UDF in FLUENT. Run an unsteady calculation for the problem using coupled solver and axisymmetry. Create animations. Prerequisites This tutorial assumes that you are familiar with the FLUENT interface and have completed Tutorial 1 from the FLUENT 6.1 Tutorial Guide. Some of the basic steps in the setup and solution procedures will not be shown explicitly. You should be familiar with the dynamic mesh model. If you are not, please review Section 9.6: Dynamic Meshes in the FLUENT User’s Guide. Note: Assuming that you are using a single processor machine with a clock speed of 2 GHz, this tutorial will take: One hour to work through it. An additional 6 hours for the calculations up to the uncorking of the projectile. An additional 43.5 hours for the calculations until the projectile leaves the field of view. c Fluent Inc. March 27, 2006 1
Transcript
Page 1: Fluent - Tutorial - Dynamic Mesh - Projectile Moving Inside a Barrel

Tutorial: Projectile Moving Inside a Barrel

Introduction

The purpose of this tutorial is to illustrate how to set up and solve a problem using thefollowing two features in FLUENT.

• Moving Deforming Mesh (MDM) using the layering algorithm.

• User-defined real gas law.

The problem involves a projectile moving through a barrel and out of the muzzle. The flowis assumed to be inviscid.

In this tutorial you will learn how to:

• Read a mesh file for performing an MDM calculation.

• Compile a UDF for the projectile motion and the Abel-Nobel real gas law.

• Set up the moving zones and hook the UDF in FLUENT.

• Run an unsteady calculation for the problem using coupled solver and axisymmetry.

• Create animations.

Prerequisites

This tutorial assumes that you are familiar with the FLUENT interface and have completedTutorial 1 from the FLUENT 6.1 Tutorial Guide. Some of the basic steps in the setup andsolution procedures will not be shown explicitly. You should be familiar with the dynamicmesh model. If you are not, please review Section 9.6: Dynamic Meshes in the FLUENTUser’s Guide.

Note: Assuming that you are using a single processor machine with a clock speed of 2 GHz,this tutorial will take:

• One hour to work through it.

• An additional 6 hours for the calculations up to the uncorking of the projectile.

• An additional 43.5 hours for the calculations until the projectile leaves the fieldof view.

c© Fluent Inc. March 27, 2006 1

Page 2: Fluent - Tutorial - Dynamic Mesh - Projectile Moving Inside a Barrel

Projectile Moving Inside a Barrel

Problem Description

A projectile weighing 120 grams is initially at rest inside a 20 mm caliber barrel. The gasinside the chamber is patched at a high pressure of 3000 atm and a temperature of 2700 K,and the projectile is released.

The motion of the projectile is computed using a UDF based on FLUENT’s Six Degree ofFreedom UDF. In this case, only the pressure forces are considered, while drag and me-chanical friction are neglected. The projectile is released at t=0. The Abel-Nobel equationof state is implemented using the user-defined real gas model.

Figure 1: Problem Schematic

Preparation

1. Copy the mesh file, projectile.msh.gz and the UDF source files, aneos.c andsix dof property.c, to your working directory.

2. Start the 2D version of FLUENT.

2 c© Fluent Inc. March 27, 2006

Page 3: Fluent - Tutorial - Dynamic Mesh - Projectile Moving Inside a Barrel

Projectile Moving Inside a Barrel

Setup and Solution

Step 1: Grid

1. Read the grid file, projectile.msh.gz.

File −→ Read −→Case...

FLUENT will read the file and report the progress in the console window.

2. Check the grid.

Grid −→Check

3. Reorder the domain.

Grid −→ Reorder −→Domain

Note: Perform this operation until the band width reduction is in the order of 1.0.

4. Scale the grid.

Grid −→Scale...

This mesh was created for a 155 mm barrel. To use this mesh for a 20 mm barrel inthis tutorial, you need to scale it accordingly.

(a) Set the Scale Factors for both X and Y to 0.129.

(b) Click Scale and close the panel.

c© Fluent Inc. March 27, 2006 3

Page 4: Fluent - Tutorial - Dynamic Mesh - Projectile Moving Inside a Barrel

Projectile Moving Inside a Barrel

5. Display the grid.

Display −→Grid...

(a) Retain the default parameters.

(b) Click Display and close the panel.

Figure 2: Grid Display

4 c© Fluent Inc. March 27, 2006

Page 5: Fluent - Tutorial - Dynamic Mesh - Projectile Moving Inside a Barrel

Projectile Moving Inside a Barrel

Figure 3: Dimensions and Zone Names

This grid was created using GAMBIT. The region inside the barrel (on both sides of theprojectile) and the region forming the extension of the muzzle are meshed with quadsand lumped into one fluid zone called fluid-mdm.

The rest of the domain consists of one face that is disconnected from the other faces,and the corresponding zone is called fluid-static-outer. Thus, there are two setsof edges where the two fluid regions meet. Each set is turned into an interface zoneand allows you to define a non-conformal interface at a later stage. Boundary layersare attached to the interface edge at the bottom of fluid-static-outer. This portionof the zone is meshed using quads.

6. Zoom in to the muzzle area (Figure 4).

Figure 4: Mesh Near the Muzzle

c© Fluent Inc. March 27, 2006 5

Page 6: Fluent - Tutorial - Dynamic Mesh - Projectile Moving Inside a Barrel

Projectile Moving Inside a Barrel

The entire zone, default-interior slides to the right, while keepingdefault-interior:001 stationary. At the same time, cells are created on the left (atthe edge labeled breech in Figure 5), and destroyed on the right (at the edge labeledp-out-destruct in Figure 3).

7. Zoom in near the breech and projectile (Figure 5).

Figure 5 shows the default-interior zone, which will move to the right. By specify-ing the rigid body motion of default-interior you are also specifying the rigid bodymotion of the walls belonging to the projectile (w-proj-base and w-proj-front).

New quad cells are created at the left wall labeled breech. Conversely, quad cells aredestroyed at the edge labeled p-out-destruct.

The combination of moving one zone as a rigid body while creating and destroyingcells is called “layering”.

6 c© Fluent Inc. March 27, 2006

Page 7: Fluent - Tutorial - Dynamic Mesh - Projectile Moving Inside a Barrel

Projectile Moving Inside a Barrel

Figure 5: Mesh Near the Breech and Chamber

8. View the zones, interface-inner and interface-outer (Figure 6).

(a) Zoom out and under Surfaces, deselect default-interior, default-interior:001, andinterface-outer to see where interface-inner is located.

(b) Deselect interface-inner and select interface-outer.

Figure 6: Definition of the Non-Conformal Interface

In Figure 6, the three red, dotted line segments represent the interface-outer zoneand the seven blue line segments (including the bottoms of the muzzle brakes) representthe interface-inner zone.

c© Fluent Inc. March 27, 2006 7

Page 8: Fluent - Tutorial - Dynamic Mesh - Projectile Moving Inside a Barrel

Projectile Moving Inside a Barrel

Step 2: Models

1. Select the solver.

Define −→ Models −→Solver...

(a) Under Solver, select Coupled and retain Implicit formulation.

The real gas law works only with the Coupled solver.

(b) Select Axisymmetric space and Unsteady and 1st-Order Implicit time formulation.

MDM features currently work only with Unsteady and 1st-Order Implicit formu-lation.

2. Enable the Energy Equation.

Define −→ Models −→Energy...

8 c© Fluent Inc. March 27, 2006

Page 9: Fluent - Tutorial - Dynamic Mesh - Projectile Moving Inside a Barrel

Projectile Moving Inside a Barrel

3. Set the viscous model to inviscid.

Define −→ Models −→Viscous...

(a) Enable Inviscid.

4. Set the units for pressure.

Define −→Units...

(a) Under Quantities, select Pressure.

(b) Under Units, select atm.

5. Set the Operating Pressure to 0.

Define −→Operating Conditions...

(a) Under Operating Pressure, enter 0.

This setting is usually used with the coupled solver, to avoid confusion between absoluteand gauge pressures. With the operating pressure set to zero, the static and absolutepressures will be equivalent.

Step 3: Compile the UDF

This UDF (based on FLUENT’s 6DOF UDF) is parallelized and has a restart capability,where previous velocities and Euler angles are written to a file. Although the UDF seems tobe complicated, very few changes have been made to customize it for this tutorial.

The Abel-Nobel Equation Of State (ANEOS) is implemented using FLUENT’s user-definedreal gas model. ANEOS is a truncated version of the Van der Waals equation of state;ANEOS is defined as:

p(v − b) = RT (1)

where v is the specific volume and b is the covolume term, that represents the volume occupiedby the molecules themselves.

For this case, the initial specific volume is 0.00382 m3/kg, while the covolume term is0.001265 m3/kg, indicating that about a fourth of the volume is occupied by the moleculesthemselves.

With regard to the motion of the projectile, the UDF computes the total force (viscous pluspressure) acting on the projectile base and on the projectile nose, and then Newton’s SecondLaw is used to compute the acceleration. The new velocity is then calculated using a finitedifference.

c© Fluent Inc. March 27, 2006 9

Page 10: Fluent - Tutorial - Dynamic Mesh - Projectile Moving Inside a Barrel

Projectile Moving Inside a Barrel

1. Compile the UDF.

Define −→ User-Defined −→ Functions −→Compiled...

(a) Under Source Files, click Add....

(b) In the Select File panel, select the source files, aneos.c and six dof property.

(c) Under Library Name, enter libudf-6dof-real.

(d) Click Build (do not click Load yet).

FLUENT will set up the appropriate directory structure, and will compile thecode for you. The progress of the compilation is shown on the FLUENT consolewindow. Monitor the progress for compilation and linking errors. You can alsosee the ‘log’ file in the working directory for the compilation history.

(e) Load the library using text user interface (TUI) commands.

> /define/user-defined/real-gas/user-defined-real-gas-modeluse real gas? [no] y

User Defined Realgas Library Name [""] libudf-6dof-real

Opening user-defined realgas library "libudf-6dof-real"...Library "libudf-6dof-real/lnx86/2d/libudf.so" opened

Setting material "air" to a real-gas...

Loading Real-Ideal Library:

(f) In the Compiled UDFs panel, click Load.

For more information on compiled UDFs, refer Section 7.3, Compiling a Source FileUsing the Compiled UDFs Panel, in the UDF Manual.

Note: The Materials panel is no longer available, because the real gas law is now enabled.

10 c© Fluent Inc. March 27, 2006

Page 11: Fluent - Tutorial - Dynamic Mesh - Projectile Moving Inside a Barrel

Projectile Moving Inside a Barrel

Step 4: Boundary Conditions

1. Define the boundary conditions.

Define −→Boundary Conditions...

(a) Set the conditions for the pressure-inlet boundary.

i. Under Zone, select p-inlet-outer and click Set....

ii. Set both Gauge Total Pressure and Supersonic/Initial Gauge Pressure to 1, andretain the Total Temperature at 300 K.

(b) Set the conditions for the pressure-outlet boundary.

i. Under Zone, select p-out-destruct and click Set....

ii. Set Gauge Pressure to 1 atm and retain Backflow Total Temperature at 300 K.

(c) Similarly, for p-out-outer, set Gauge Pressure to 1 atm and retain Backflow TotalTemperature at 300 K.

(d) Set the conditions for upper-boundary boundary.

i. Under Zone, select upper-boundary, and change the Type to pressure-outlet.

ii. Click Yes in the Question dialog box that opens.

c© Fluent Inc. March 27, 2006 11

Page 12: Fluent - Tutorial - Dynamic Mesh - Projectile Moving Inside a Barrel

Projectile Moving Inside a Barrel

iii. Set Gauge Pressure to 1 atm and retain Backflow Total Temperature at 300 K.

(e) Retain the default settings for all the walls, i.e., tangency for momentum andzero heat flux for thermal and close the Boundary Conditions panel.

2. Define the non-conformal interface.

Define −→Grid Interfaces...

(a) Under Grid Interface, enter interface.

(b) Under Interface Zone 1, select interface-inner and under Interface Zone 2, selectinterface-outer

(c) Click Create.

Step 5: Dynamic Mesh Setup

1. Activate dynamic mesh motion and specify the associated parameters.

Define −→ Dynamic Mesh −→Parameters...

(a) Under Models, enable Dynamic Mesh and Six DOF Solver.

The panel will expand to show additional parameters.

(b) Under Mesh Methods, deselect Smoothing and select Layering.

(c) Click on the Layering tab and set the Split Factor and Collapse Factor to 0.4.

These factors indicate that a new layer of cells is created when the preceding layerhas stretched beyond 1.4 times the ideal height, and that a layer is destroyed whenthe last layer has shrunk to a height less than 0.6 times the ideal height.

12 c© Fluent Inc. March 27, 2006

Page 13: Fluent - Tutorial - Dynamic Mesh - Projectile Moving Inside a Barrel

Projectile Moving Inside a Barrel

2. Specify the rigid body motion for the projectile and surrounding fluid.

By specifying the motion of the fluid zone, fluid-mdm, you are specifying the motionof the quad cells and of the projectile itself (i.e., the two zones w-proj-base and w-proj-front).

Define −→ Dynamic Mesh −→Zones...

(a) In the Zone Names list, select fluid-mdm.

(b) Retain Rigid Body as the motion Type.

(c) In the Motion Attributes tab, ensure that under Six DOF Solver Options, On isenabled.

(d) Ensure that under Six DOF UDF, projectile::libudf-6dof-real is selected. and clickCreate.

The six dof::libudf-6dof-real UDF defines the rigid body motion. This will movethe face that hosts the quad cells, together with the edges (wall-object and default-interior).

c© Fluent Inc. March 27, 2006 13

Page 14: Fluent - Tutorial - Dynamic Mesh - Projectile Moving Inside a Barrel

Projectile Moving Inside a Barrel

3. Specify the stationary zone where new cell layers are created.

(a) In the Zone Names list, select breech.

(b) Under motion Type, select Stationary.

(c) Under Meshing Options, specify the Cell Height as 0.000645 m and click Create.

This is the axial dimension of the cells near the breech. This boundary zone thusbecomes the location where new cells are created.

4. Specify the stationary zone where old cell layers are destroyed.

(a) In the Zone Names list, select p-out-destruct.

(b) Retain the motion Type as Stationary, Cell Height as 0.000645, and click Create.

5. Specify conditions for surfaces of projectile.

(a) In the Zone Names list, select w-proj-base.

(b) Under Type, enable Rigid body.

(c) Click on the Meshing Options tab and set Cell Height to 0.000645.

(d) Click Create.

(e) In the Zone Names list, select w-proj-front.

(f) Under Type, retain Rigid body.

(g) In the Meshing Options tab, retain Cell Height at 0.000645.

(h) Click Create.

Step 6: Initial Solution

1. Set the upper limits for pressure and temperature.

Solve −→ Controls −→Limits...

(a) Set the Maximum Absolute Pressure to 3500 and retain Maximum Static Temper-ature at 5000 and click OK.

14 c© Fluent Inc. March 27, 2006

Page 15: Fluent - Tutorial - Dynamic Mesh - Projectile Moving Inside a Barrel

Projectile Moving Inside a Barrel

2. Initialize the solution.

Solve −→ Initialize −→Initialize...

(a) Under Compute From, select p-inlet-outer.

(b) Click Init and close the panel.

3. Define an adaption register.

Adapt −→Region...

(a) Under Input Coordinates, specify X Min and X Max as -0.129 and -0.116, re-spectively and Y Min and Y Max as 0, and 0.01, respectively.

(b) Click Mark.

FLUENT will report 288 cells marked for refinement.

(c) Click Manage... and in the Manage Adaption Registers panel, click Display.

The chamber now appears in red (Figure 7).

c© Fluent Inc. March 27, 2006 15

Page 16: Fluent - Tutorial - Dynamic Mesh - Projectile Moving Inside a Barrel

Projectile Moving Inside a Barrel

Adaption Markings (hexahedron-r0) (Time=0.0000e+00)FLUENT 6.2 (axi, coupled imp, dynamesh, unsteady)

Nov 18, 2005

Figure 7: Chamber Appears Red

4. Patch the chamber.

Solve −→ Initialize −→Patch...

(a) Under Variable, select Pressure.

(b) Enter a Value of 3000 atm.

(c) Under Registers To Patch, select hexahedron-r0.

(d) Click Patch.

(e) Similarly, patch Temperature at 2700 K.

16 c© Fluent Inc. March 27, 2006

Page 17: Fluent - Tutorial - Dynamic Mesh - Projectile Moving Inside a Barrel

Projectile Moving Inside a Barrel

5. Display contours of pressure, temperature, and density to verify the patching andconfirm the density of 262 kg/m3 in the chamber.

6. Save the case and data files as, gun-6dof-real-init.cas.gz.

Step 7: Mesh Motion Preview

The mesh motion preview utility is useful for verifying that the mesh motion parametersyield the desired mesh motion.

Because the initialized flow includes a patch, the projectile is driven by the patched pressuredifferential. The preview is driven at a constant acceleration, based on that initial pressureforce, because the flow is not computed during the preview.

1. Display the grid for the entire domain.

2. Specify the mesh motion.

Solve −→Mesh Motion...

(a) Set the Time Step Size to 1e-6 seconds.

(b) Set Number of Time Steps to 40 and click Preview.

Study the mesh motion. Observe the chamber and the projectile.

3. Zoom in to see the chamber and the projectile and click Preview again.

You can see how cells are being created, initially at a rate of one new layer for everythirty time steps.

4. Zoom in near the zone, p-out-destruct on the far right and click Preview and see howthe cells are being destroyed.

At the beginning of each new time step, messages from the UDF will appear in theTUI.

UDF message follows:UDF messageUDF message: Flow time (sec) is .......... : 0.000157UDF message: Axial velocity (m/s) is ..... : 125.631042

c© Fluent Inc. March 27, 2006 17

Page 18: Fluent - Tutorial - Dynamic Mesh - Projectile Moving Inside a Barrel

Projectile Moving Inside a Barrel

UDF messageUDF message: Change in axial position (mm) : 0.125631UDF message: Axial position (m): 0.009988UDF message: Net axial force (N) is ...... : 95416.828125UDF messageUDF message: Axial force on base is 95448.804688UDF message: Axial force on nose is -31.982697UDF message

5. Exit FLUENT without saving.

After verifying the correct behavior of the dynamic mesh, you can start again withthe projectile at its starting point. Because the mesh has deformed and the projectilehas moved, it is required to exit FLUENT without saving to revert to the original meshposition.

Step 8: Postprocessing Setup

1. Start the 2D version of FLUENT and read the saved case and data files,projectile-6dof-real-init.cas.gz.

File −→ Read −→Case & Data...

Note: If you have parallel licenses, you can also run parallel at this point, but youwill have to recompile the fully parallelized UDF. This tutorial has been tested inparallel mode.

2. Display contours of velocity.

Display −→Contours...

(a) Under Contours Of, select Velocity and Velocity Magnitude.

(b) Under Options, select Filled and deselect Global Range, Auto Range, and Clip toRange.

(c) Increase the Levels to 50.

(d) Set the value of Min to 0.001 and Max to 1000.

(e) Click Display and close the panel.

3. Define a surface monitor for absolute pressure (monitor-1).

Solve −→ Monitors −→Surface...

(a) Increase Surface Monitors to 1.

(b) Enable Plot, Print, and Write.

(c) Under Every, select Time Step and click Define....

i. In the Define Surface Monitor panel, under Report Type, select Area-WeightedAverage.

ii. Under X Axis, select Flow Time.

18 c© Fluent Inc. March 27, 2006

Page 19: Fluent - Tutorial - Dynamic Mesh - Projectile Moving Inside a Barrel

Projectile Moving Inside a Barrel

iii. Increase Plot Window to 1.

iv. Under Report Of, select Pressure and Absolute Pressure.

v. Under Surfaces, select breech.

vi. Click OK.

4. Define a surface monitor for velocity magnitude (monitor-2).

(a) Increase Surface Monitors to 2.

(b) Enable Plot, Print, and Write.

(c) Under Every, select Time Step and click Define....

i. In the Define Surface Monitor panel, under Report Type, select Area-WeightedAverage.

ii. Under X Axis, select Flow Time.

iii. Increase Plot Window to 2.

iv. Under Report Of, select Velocity and Velocity Magnitude.

v. Under Surfaces, deselect breech and select w-proj-base.

vi. Click OK.

5. Define a surface monitor to track the x-position of the projectile (monitor-3).

(a) Increase Surface Monitors to 3.

(b) Enable Plot, Print, and Write.

(c) Under Every, select Time Step and click Define....

i. In the Define Surface Monitor panel, under Report Type, select Vertex Average.

ii. Under X Axis, select Flow Time.

iii. Increase Plot Window to 3.

iv. Under Report Of, select Grid and X-Coordinate.

v. Under Surfaces, retain w-proj-base.

vi. Click OK.

(d) Click OK and close the panel.

6. Enable the logarithmic scale.

Display −→Colormaps...

(a) Enable Log Scale.

(b) Under Number Format, set Type to general and Precision to 4.

(c) Under Colormaps, ensure that Colormap Size is set to 50.

(d) Click Apply and close the panel.

c© Fluent Inc. March 27, 2006 19

Page 20: Fluent - Tutorial - Dynamic Mesh - Projectile Moving Inside a Barrel

Projectile Moving Inside a Barrel

7. Set the display in the graphic window.

(a) Display velocity contours as described in Step 8-2.

(b) Zoom in and adjust the view as shown in Figure 8.

Figure 8: Display for Animation

(c) Save the view file.

Display −→Views...

i. Under Save Name, enter view-projectile.

ii. Under Actions, click Save and then click Write....

The Write Views panel opens

iii. Under Views to Write, select view-projectile.

20 c© Fluent Inc. March 27, 2006

Page 21: Fluent - Tutorial - Dynamic Mesh - Projectile Moving Inside a Barrel

Projectile Moving Inside a Barrel

iv. Click OK and enter File Name as viewfile.

8. Set hardcopy parameters.

File −→Hardcopy...

(a) Under Format, enable TIFF.

(b) Under Coloring, enable Color.

(c) Under Resolution set the Width and Height to 800 and 600, respectively.

(d) Click Apply and close the panel.

9. Set executable commands.

Solve −→Execute Commands...

(a) Increase Defined Commands to 1.

(b) Increase Every to 10.

(c) Under When, select Time Step.

(d) Under Command, enter the TUI command:display contour velocity-magnitude 0.001 1000

(e) Enable On.

(f) Increase Defined Commands to 2.

(g) Increase Every to 10.

(h) Under When, select Time Step.

(i) Under Command, enter the TUI command:display hard-copy tiff-files/projectile-%t.tiff

(j) Enable On and click OK.

Note: Ensure that you create a subfolder named tiff-files in the working folder.The animation frames will be saved in this subfolder.

Step 9: Solution

1. Set the solution parameters.

Solve −→ Controls −→Solution...

(a) Set Courant Number to 100.

(b) Under Discretization, select First Order Upwind for Flow.

2. Enable the plotting of residuals and disable all convergence checks.

Solve −→ Monitors −→Residual...

c© Fluent Inc. March 27, 2006 21

Page 22: Fluent - Tutorial - Dynamic Mesh - Projectile Moving Inside a Barrel

Projectile Moving Inside a Barrel

(a) Enable Plot under Options.

(b) Under Plotting, set Window to 4.

(c) Under Plotting, change Iterations to 100.

3. Activate autosave option.

File −→ Write −→Autosave...

(a) Set Autosave Cas File Frequency to 50.

(b) Set Autosave Data File Frequency to 50.

(c) Enable Overwrite Existing Files.

(d) Set Maximum Number of Each File Type to 5.

(e) Enter Filename as projectile-6dof-real.gz.

projectile-6dof-real.gz is the basename for the file saves.

4. Save the case and data files, as projectile-6dof-real-init.cas.gz.

This will overwrite the previous case and data files.

5. Solve for 960 time steps.

Solve −→Iterate

22 c© Fluent Inc. March 27, 2006

Page 23: Fluent - Tutorial - Dynamic Mesh - Projectile Moving Inside a Barrel

Projectile Moving Inside a Barrel

(a) Set the Time Step Size to 1e-06 and the Number of Time Steps to 960.

(b) Set the Maximum Iterations per Time Step to 25 and click Iterate.

After about five time steps, the pressure monitor becomes nearly flat at the endof each time step. This indicates convergence within each time step. The residu-als for axial velocity, continuity, and energy are dropping well within each timestep. The radial velocity is less responsive because the flow is essentially one-dimensional, causing the y-residual to be normalized by a small number.

Note: The 960 time steps will take about 5.75 hours on a single processor witha clock speed of 2 GHz. At this time, you may choose to close this sessionof FLUENT, and resume from the instant the projectile leaves the muzzle. Ifyou choose to exit, you will not be able to produce a complete animation.

At the end of 960 time steps, the base of the projectile is just short of exiting themuzzle, i.e., just short of shot exit (uncorking). At this point, it is traveling atabout 154 m/s, and the pressure inside the barrel is about 82 atmospheres. Theflow time is near 0.96 milliseconds, and the maximum flow velocities are about270 m/s. The contours of velocity are shown in Figure 9.

6. Solve until the projectile reaches the end of the muzzle.

(a) Solve for 960 time steps, with 25 iterations per time step.

Solve −→Iterate...

c© Fluent Inc. March 27, 2006 23

Page 24: Fluent - Tutorial - Dynamic Mesh - Projectile Moving Inside a Barrel

Projectile Moving Inside a Barrel

Figure 9: Velocity Contours at the Instant of Uncorking

(b) Save the current case and data files as projectile-6dof-real-960msec.cas.gzand projectile-6dof-real-960msec.dat.gz.

7. Solve until the projectile is placed well beyond the second muzzle brake.

(a) In the Iterate panel, set the Time Step Size to 1e-07 seconds (smaller by a factorof ten).

(b) In the Execute Commands panel, change Every from 10 to 100 for the two definedcommands.

(c) Set the Number of Time Steps to 6400 and click Iterate.

This calculation will take about 43.5 hours on a single processor with a clockspeed of 2 GHz. This will place the projectile well to the right of the secondmuzzle brake. The final flow time will be about 1.60 msec.

Note: If you do not want to run the iterations, you can read the final case and data files,projectile-6dof-real-final.cas.gz and projectile-6dof-real-final.dat.gzand proceed with the postprocessing.

Step 10: Postprocessing

1. Display the Velocity Magnitude (Figure 10).

Display −→Contours...

(a) Display velocity contours as described in Step 8-2.

2. Display the animation by entering the command animate *.tiff in the folder tiff-files.

24 c© Fluent Inc. March 27, 2006

Page 25: Fluent - Tutorial - Dynamic Mesh - Projectile Moving Inside a Barrel

Projectile Moving Inside a Barrel

Figure 10: Velocity Contours at the End of the Simulation

c© Fluent Inc. March 27, 2006 25


Recommended