Uploaded by Mojtaba Barjasteh

ansys-cfx-tutorials-170-buoy-rigid-body-solver compress

advertisement
Chapter 32: Modeling a Buoy using the CFX Rigid Body Solver
This tutorial includes:
32.1.Tutorial Features
32.2. Overview of the Problem to Solve
32.3. Preparing the Working Directory
32.4. Simulating the Buoy with Fully Coupled Mesh Motion
32.5. Simulating the Buoy with Decoupled Mesh Motion
32.6. Comparing the Two Cases Using CFD-Post
32.1. Tutorial Features
In this tutorial you will learn about:
• Modeling a multiphase simulation in CFX-Pre.
• Creating and editing a rigid body in CFX-Pre.
• Creating and editing a subdomain in CFX-Pre.
• Creating a keyframe animation in CFD-Post.
Component
Feature
Details
CFX-Pre
User Mode
General mode
Analysis Type
Transient
Fluid Type
General Fluid
Domain Type
Single Domain
Turbulence Model
Shear Stress Transport
Heat Transfer
Isothermal
Buoyant Flow
Multiphase
Homogeneous Model
Rigid Body
3 degrees of freedom
Boundary Conditions
Symmetry Plane
Wall: No Slip
Wall (Specified
Displacement)
Opening
Mesh Motion option of
Rigid Body Solution
Subdomain
Mesh Motion option of
Rigid Body Solution
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
721
Modeling a Buoy using the CFX Rigid Body Solver
Component
CFD-Post
Feature
Details
ANSYS CFX Command
Language (CCL)
Importing Expressions
Plots
Contour Plot
Animations
Keyframe
32.2. Overview of the Problem to Solve
In this tutorial you will model the interaction between a rigid body (represented by a buoy) and two
fluids (air and water) that make up the surrounding region, using a six degrees of freedom rigid-body
solver. In this case, the fluid forces acting on the buoy cause motion that is constrained to three degrees
of freedom: vertical and horizontal translation and rotation about an axis perpendicular to the translational directions. The motion of the floating buoy results from interactions between itself and the wave
motion of the surrounding fluid created by an initial contraction of the domain in the X direction.
The rigid body is surrounded by a fluid volume that is part air and part water (both at a static temperature of 25°C). Because the rigid body has a density of 500 kg m^-3 – less than that of water (997 kg
m^-3) – it floats atop the water's surface. The right-side wall, highlighted yellow in the image above, is
given an initial velocity in the negative X direction, thereby causing the fluid domain to shrink. This in
turn causes waves in the water. An opening is required along the top face to enable air to move in and
out of the fluid region while the volume fraction of air and water are in a state of flux. Because of this
contraction of the fluid region, you will also need to define the mesh motion of the domain, subdomain,
and several of the boundary conditions.
A homogeneous, multiphase model will be used for this simulation because the air and water will
maintain a well-defined interface. When setting up the initial conditions for the simulation, CCL-defined
722
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
Preparing the Working Directory
step functions will be used to determine the volume fractions of water and air defined by a function
of height.
The relevant fluid parameters of this problem are:
• Density of water = 997 [kg m^-3]
• Static temperature of water = 25 [C]
• Density of air = 1.185 [kg m^-3]
• Static temperature of air = 25 [C]
The relevant physical parameters of the rigid body are:
• Mass = 39.39 [kg]
• Density = 500 [kg m^-3]
• Volume = 0.07878 [m^3]
• Mass moment of inertia (XX, YY, ZZ, XY, XZ, YZ) = (4.5, 2.1, 6.36, 0, 0, 0) [kg m^2]
• Initial Center of Mass (X, Y, Z) = (0, —0.1438, 0.05) [m]
The first step in solving this problem is to import a pre-existing mesh file into CFX-Pre. A CCL file containing several mathematical expressions for this simulation will also be imported into CFX-Pre. The
transient analysis conditions will then be defined and the default domain edited. A number of boundary
conditions will also be created within CFX-Pre. Mesh motion within the domain and several of the
boundary conditions will be specified because the domain will contract at the beginning of the simulation,
and because the buoy will move freely due to wave motion causing motion of the fluids and hence
the rigid body within the domain. In the first simulation, the motion of the mesh surrounding the rigid
body will be fully coupled to the motion of the buoy, including the rotation of the buoy; the mesh will
both rotate and translate with the buoy. In the second simulation the rotational and translational motion
will be decoupled, enabling the inner cylindrical subdomain to rotate at the same rate as the buoy
while the outer domain will deform solely with the translational motion of the buoy. In both simulations
in CFD-Post, a contour plot will be created to visualize the air/water makeup of the fluid region and
the mesh will be visible to observe the mesh when it deforms. In addition, one animation for each
simulation will be produced in order to show the complex motion of the rigid body and mesh deformation.
If this is the first tutorial you are working with, it is important to review the following topics before
beginning:
• Running ANSYS CFX Tutorials Using ANSYS Workbench (p. 4)
• Changing the Display Colors (p. 7)
32.3. Preparing the Working Directory
1.
Create a working directory.
ANSYS CFX uses a working directory as the default location for loading and saving files for a particular session or project.
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
723
Modeling a Buoy using the CFX Rigid Body Solver
2.
Ensure the following tutorial input files are in your working directory:
• Buoy.gtm
• Buoy.ccl
The tutorial input files are available from the ANSYS Customer Portal. To access tutorials and their
input files on the ANSYS Customer Portal, go to http://support.ansys.com/training.
3.
Set the working directory and start CFX-Pre.
For details, see Setting the Working Directory and Starting ANSYS CFX in Stand-alone Mode (p. 3).
32.4. Simulating the Buoy with Fully Coupled Mesh Motion
In this simulation, the motion of the mesh surrounding the rigid body will be fully coupled to the motion
of the buoy, including the rotation of the buoy; the mesh will both rotate and translate with the buoy.
32.4.1. Defining the Case Using CFX-Pre
This section describes the step-by-step definition of the flow physics in CFX-Pre.
1.
If you want to set up the simulation automatically using a tutorial session file:
a.
Run Buoy.pre.
For details, see Playing a Session File (p. 6).
b.
Proceed to Obtaining the Solution Using CFX-Solver Manager (p. 743).
2.
In CFX-Pre, select File > New Case.
3.
Select General and click OK.
4.
Select File > Save Case As.
5.
Under File name, type Buoy.
6.
Click Save.
32.4.1.1. Importing the Mesh
1.
Right-click Mesh and select Import Mesh > CFX Mesh.
The Import Mesh dialog box appears.
2.
3.
724
Configure the following setting(s):
Setting
Value
File name
Buoy.gtm
Click Open.
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
Simulating the Buoy with Fully Coupled Mesh Motion
32.4.1.2. Importing the Required Expressions From a CCL File
The mathematical expressions for this simulation will be imported from a CFX Command Language
(CCL) file. These expressions will be used to set a monitor point and the physical parameters of the
simulation: the fluid properties and the displacement of the walls and opening.
Note
The expressions or physics for a simulation can be saved to a CCL file at any time by selecting
File > Export > CCL.
1.
Select File > Import > CCL.
The Import CCL dialog box appears.
2.
Under Import Method, select Append. This will start with the existing CCL already generated by CFX-Pre
and append the imported CCL.
Note
Replace is useful if you have defined physics and want to update or replace them with
newly-imported physics.
3.
Select Buoy.ccl.
4.
Click Open.
5.
Double-click the Expressions section in the Outline tree to see a list of the expressions that have been
imported.
All expressions required for this simulation are displayed. Take a moment to look over each expression. A brief description of each expression will be provided wherever it is implemented within
this tutorial.
6.
Close the Expressions section by clicking Close
located at the top of the left workspace.
Note
Note that you could have entered these expressions manually into CFX-Pre by inserting
new expressions and defining each with an appropriate formula.
32.4.1.3. Defining a Transient Simulation
1.
In the Outline tree view, right-click Analysis Type and select Edit.
2.
Configure the following setting(s):
Tab
Setting
Basic Settings
Analysis Type
Value
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
725
Simulating the Buoy with Fully Coupled Mesh Motion
32.4.1.4. Editing the Domain
In this section you will create the fluid domain to reflect the multiphase, homogeneous region surrounding the buoy, define the fluids, and enable mesh motion.
1.
Edit Case Options > General in the Outline tree view, ensure Automatic Default Domain and
Automatic Default Interfaces are both selected, and click OK.
2.
In the tree view, right-click Default Domain, select Rename, and set the new name to buoy.
3.
In the tree view, right-click the newly renamed domain and select Edit.
4.
Configure the following setting(s):
Tab
Setting
Basic Settings
Location and Type
Value
> Location
Assembly [a]
Fluid and Particle Definitions
Delete Fluid 1 [b]
Fluid and Particle Definitions
Create a new fluid
named Air at
25 C
Fluid and Particle Definitions
[c]
Create a new fluid
named Water at
25 C
[c]
Fluid and Particle
Definitions
> Air at 25 C
> Material
Air at 25 C
Fluid and Particle
Definitions
> Water at 25 C
> Material
Water at 25 C [d]
Domain Models
> Buoyancy Model
> Option
Buoyant
Domain Models
> Buoyancy Model
> Gravity X Dirn.
0 [m s^-2]
Domain Models
> Buoyancy Model
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
727
Modeling a Buoy using the CFX Rigid Body Solver
Tab
Setting
Value
located beside
Library Data to Import box appears, click Expand
Water Data. Select Water at 25 C from the list. Click OK.
e. In order to enter an expression, you must first click Enter Expression
f.
.
The buoyancy reference density is set to 1.185 kg/m3, which is representative
of air.
g. This mesh deformation option enables you to specify the motion of the boundary
mesh nodes using user-defined expressions created in the CFX Expression
Language (CEL). These expressions of mesh motion are included in the CCL file
that was imported at the beginning of the tutorial.
h. To see the additional mesh motion settings, you may need to click Roll Down
located beside Mesh Motion Model.
i.
The Displacement Diffusion model for mesh motion preserves the relative mesh
distribution of the initial mesh.
j.
The variable volcvol (volume of finite volumes) is a predefined variable related
to the local mesh element volume. It is used here in the calculation of the mesh
stiffness value. In this example, the mesh stiffness is set to be inversely
proportional to volcvol, which results in higher stiffness in regions of smaller
element size; these are the regions that are most likely to experience mesh
folding. This is similar to the default setting of Mesh Stiffness > Option set to
Increase Near Small Volumes with Reference Volume > Option set
to Mean Control Volume.
k. In a homogeneous, multiphase model, all fluids share a flow field, turbulence
field, and so on. This is valid for models where the fluids have completely
stratified; this is the case in this simulation.
l.
5.
The interphase transfer model controls the calculation of interfacial area density,
which is required by certain interfacial transfer processes. In this case, the
homogeneous model is used and no other interfacial transfer processes are
active so the actual setting does not matter.
Click OK.
32.4.1.5. Creating a Rigid Body
In this section you will specify the properties of a rigid body with three degrees of freedom: translation
in the X and Y directions and rotation about the Z axis. The rigid body definition will be applied to the
wall boundary of the buoy to define the motion characteristics of the buoy. Further, you will specify
the direction of gravity that acts upon the buoy's mass. Aside from gravity, no external forces are specified
to act continuously on the buoy, however the motion of the buoy will be driven by fluid forces (from
both the air and water) acting on the surface of the rigid body.
730
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
Simulating the Buoy with Fully Coupled Mesh Motion
Tab
Setting
Value
Angular Velocity
> Z Component
0 [radians s^-1]
a. The values in this table are taken directly from the problem description found in
the Overview of the Problem to Solve (p. 722) section.
b. In order to enter an expression, you must first click Enter Expression
.
c. Setting this option to Automatic defaults the center of mass of the rigid body to
the origin of the RigidBodyCoordFrame. In most cases, this will be the correct
setting.
5.
Click OK.
32.4.1.6. Creating the Boundary Conditions
In this section symmetry boundaries will be created for the front and back planes of the given geometry;
this is required because a 2D representation of the flow field is being modeled. Wall boundaries will
also be created for the bottom, stationary side, moving side, and buoy body sections of the fluid region.
Because the right-side wall will be provided with an initial velocity in the negative X direction, you will
define mesh motion along this direction for the moving wall boundaries. An opening boundary will
also be created along the top of the fluid region to enable air to flow freely in and out of this region
because of the interactions between the air and water (as a result of the moving wall).
32.4.1.6.1. Symmetry Boundaries
The front and back planes each require a symmetry boundary.
1.
Create a new boundary named back.
2.
Configure the following setting(s):
Tab
Setting
Value
Basic
Settings
Boundary Type
Symmetry
Location
BACK A, BACK B [a]
Boundary
Details
Mesh Motion
> Option
Unspecified
[b]
a. Hold the Ctrl key while selecting both BACK A and BACK B from the list.
b. In the unspecified mesh motion option, no mesh motion constraints are applied
directly to the nodes. Instead, mesh motion is governed by the constraints in
other regions of the mesh.
3.
Click OK.
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
733
Modeling a Buoy using the CFX Rigid Body Solver
4.
Create a second boundary named front.
5.
Configure the following setting(s):
Tab
Setting
Value
Basic
Settings
Boundary Type
Symmetry
Location
FRONT A, FRONT B
[a]
Boundary
Details
Mesh Motion
> Option
Unspecified[b]
a. Hold the Ctrl key while selecting both FRONT A and FRONT B from the list.
b. In the unspecified mesh motion option, no mesh motion constraints are applied
directly to the nodes. Instead, mesh motion is governed by the constraints in
other regions of the mesh.
6.
Click OK.
32.4.1.6.2. Wall Boundaries
The top, bottom, and sides of the fluid region all require wall boundaries. In addition, the surface
between the fluid region and the rigid body, Rigid Body 1, requires a wall boundary; this wall
boundary will move according to the rigid body solution.
1.
Create a new boundary named Buoy Surface.
2.
Configure the following setting(s):
Tab
Setting
Value
Basic
Settings
Boundary Type
Wall
Location
BUOY
Boundary
Details
Mesh Motion
> Option
Rigid Body Solution
Mesh Motion
> Rigid Body
Rigid Body 1
Mass and Momentum
> Option
No Slip Wall
Wall Roughness
> Option
3.
Click OK.
4.
Create a new boundary named wall.
734
Smooth Wall
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
Modeling a Buoy using the CFX Rigid Body Solver
Tab
Setting
Value
sinusoidally increasing displacement is applied. This displacement increases
until 1.0 seconds into the simulation, when it plateaus at this final value.
The expression wallMeshMot is dependent on wxdisp, as can be seen
in the CCL, and will therefore take the motion of the moving side wall
into account. This expression will have no effect on the stationary wall
because this wall has an X-coordinate that is outside the part of the
expression that specifies a displacement. Thus, wallMeshMot can be
applied to all three of these walls; it is equally applicable to each.
d. The left-side of the fluid region maintains its position throughout the simulation
and it is necessary to define mesh deformation of the bottom in the X direction
only. Therefore, set the mesh displacement in the Y and Z directions to 0.0
[m].
6.
Click OK.
32.4.1.6.3. Opening Boundary
1.
Create a new boundary named top.
2.
Configure the following setting(s):
Tab
Setting
Value
Basic
Settings
Boundary Type
Opening
Location
TOP
Boundary
Details
Mesh Motion
> Option
Specified
Displacement
Mesh Motion
> Displacement
> Option
Cartesian
Components
Mesh Motion
> Displacement
> X Component
wallMeshMot [a]
Mesh Motion
> Displacement
> Y Component
0.0 [m]
Mesh Motion
> Displacement
736
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
Simulating the Buoy with Fully Coupled Mesh Motion
Tab
Setting
Value
> Z Component
0.0 [m]
Mass and Momentum
> Option
Opening Pres. and
Dirn
Mass and Momentum
> Relative Pressure
Fluid
Values
0 [Pa]
Boundary Conditions
> Air at 25 C
> Volume Fraction
> Volume Fraction
1.0
Boundary Conditions
> Water at 25 C
> Volume Fraction
> Volume Fraction
0.0
[b]
a. The same mesh motion is provided for the top boundary and the bottom
boundary. They will move in unison.
b. The top boundary comes into contact only with air, and not with water. The
volume fraction of the opening for air is set to 1.0 and that of water to 0.0,
therefore enabling only air to pass through the opening.
3.
Click OK.
Note
Opening boundary types are used to enable the flow to leave and re-enter the domain. This
behavior is expected due to the motion of the water and the interaction between the air
and water in the fluid region.
32.4.1.7. Setting Initial Values
Because a transient simulation is being modeled, initial values are required for all variables.
.
1.
Click Global Initialization
2.
Configure the following setting(s):
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
737
Modeling a Buoy using the CFX Rigid Body Solver
Tab
Setting
Value
Y-coordinate values greater than the initial water height, and 0.5 when the
Y-coordinate value is equal to the initial water height.
3.
Click OK.
32.4.1.8. Setting the Solver Control
In this section, you will adjust the solver control settings to promote a quicker solution time and to
enable the frequency of when the rigid body solver is run.
1.
Click Solver Control
2.
Configure the following setting(s):
.
Tab
Setting
Equation
Class
Settings
Equation Class
> Mesh Displacement
Value
(Selected)
Equation Class
> Mesh Displacement
> Convergence Control
(Selected)
Equation Class
> Mesh Displacement
> Convergence Control
> Max. Coeff. Loops
4
[a]
Equation Class
> Mesh Displacement
> Convergence Control
Rigid Body
Control
> Min. Coeff. Loops
2
Rigid Body Control
(Selected)
Rigid Body Control
> Rigid Body Solver Coupling
Control
Every Coefficient
> Update Frequency
Loop
[b]
Rigid Body Control
> Angular Momentum Equation Control
740
(Selected) [c]
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
Simulating the Buoy with Fully Coupled Mesh Motion
Tab
Setting
Value
Advanced
Options
Multiphase Control
(Selected)
Multiphase Control
> Initial Volume Fraction
Smoothing
(Selected)
Multiphase Control
> Initial Volume Fraction
Smoothing
Volume-Weighted
> Option
[d]
a. The maximum number of coefficient loops is set to 4 and the minimum number
of coefficient loops to 2 to ensure that the solver completes at least 2 loops per
time step, and no more than 4. In this simulation it will ensure a relatively resolved
and accurate solution within a short period of time.
b. By setting the update frequency to every coefficient loop you are specifying that
CFX-Solver will call the rigid body solver during every coefficient loop within
each time step. This may increase total solution time, however the motion of
the rigid body will be better resolved.
c. This sets the integration scheme for the angular momentum equations to the
second-order Simo Wong scheme, which is robust and energy-conserving.
d. If the initial conditions for volume fraction have a discontinuity, startup
robustness problems may occur. Choosing volume-weighted smoothing of these
volume fractions may improve startup robustness.
3.
Click OK.
32.4.1.9. Setting the Output Control
In this section, you will set transient results for selected variables to be captured every three time steps.
You will also create two monitor points so that you can track the progress in CFX-Solver Manager.
1.
Click Output Control
2.
Click the Trn Results tab.
3.
In the Transient Results editor, click Add new item
click OK.
4.
Configure the following setting(s) of Transient Results 1:
Setting
.
, set Name to Transient Results 1, and
Value
Transient Results 1
> Option
Selected Variables
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
741
Simulating the Buoy with Fully Coupled Mesh Motion
Monitor Objects
> Monitor Points and
Expressions
> Buoy Torq
> Option
Expression
Monitor Objects
> Monitor Points and
Expressions
> Buoy Torq
> Expression Value
torque_z()@Buoy Surface
a. To create a new item, you must first click the Add new item
and click OK.
icon, then enter the name as required
b. This monitor point will track the force acting on the rigid body in the Y direction.
c. This monitor point will track the torque of the rigid body relative to the Z axis.
6.
Click OK.
32.4.1.10. Writing the CFX-Solver Input (.def) File
1.
Click Define Run
2.
Configure the following setting(s):
3.
.
Setting
Value
File name
Buoy.def
Click Save.
CFX-Solver Manager automatically starts and, on the Define Run dialog box, Solver Input File is
set.
4.
Quit CFX-Pre, saving the simulation (.cfx) file.
32.4.2. Obtaining the Solution Using CFX-Solver Manager
When CFX-Pre has shut down and the CFX-Solver Manager has started, obtain a solution to the CFD
problem by following the instructions below.
1.
Ensure Define Run is displayed.
Solver Input File should be set to Buoy.def.
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
743
Modeling a Buoy using the CFX Rigid Body Solver
2.
Click Start Run.
CFX-Solver runs and attempts to obtain a solution. At the end of the run, a dialog box is displayed
stating that the simulation has ended.
Note
After the CFX-Solver Manager has run for a short time, you can track the monitor
points you created in CFX-Pre by clicking the User Points tab that appears at
the top of the graphical interface of CFX-Solver Manager. The two monitor points
— Buoy Force and Buoy Torq — are monitored in the global coordinate frame and
not the coordinate frame attached to the buoy. You can also view the level of
convergence of the rigid body solution through the Rigid Body Convergence
tab. Finally, the rigid body position and Euler angles can be displayed by going to
the main menu and selecting Monitors > Rigid Body > Rigid Body Position and
Monitors > Rigid Body > Rigid Body Euler Angles, respectively.
Note
New monitor points can be toggled within the current plot by right-clicking the
plot and selecting Monitor Properties. A window will display available plot line
variables. Select the box to the left of the property to display it — the plot will
adjust the scale so that all properties appear.
3.
Select Post-Process Results.
4.
If using stand-alone mode, select Shut down CFX-Solver Manager.
5.
Click OK.
32.4.3. Viewing the Results Using CFD-Post
In this section, you will create a contour plot for this case. An animation will then be created to show
the movement of the rigid body in the fluid domain. Furthermore, the minimum face angle of the mesh
will be calculated for comparison purposes between the simulations.
32.4.3.1. Creating a Contour Plot
1.
Right-click a blank area in the viewer and select Predefined Camera > View From +Z.
2.
Create a new Plane and accept the default name.
3.
Configure the following setting(s):
Tab
Setting
Geometry
Definition
> Method
Value
XY Plane
Definition
>Z
744
0.05 [m]
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
Simulating the Buoy with Fully Coupled Mesh Motion
4.
Click Apply.
5.
Create new contour and accept the default name.
6.
Configure the following setting(s):
Tab
Setting
Value
Geometry
Locations
Plane 1
Variable
Water at 25
C.Volume Fraction
Color Map
White to Blue
# of Contours
10
7.
Click Apply.
8.
Select File > Save State and choose the name Buoy.cst.
9.
Click Save.
32.4.3.2. Creating a Keyframe Animation
A short animation of the rigid body and surrounding fluid region, starting from rest and given an initial
velocity, will be created to show the complex motion of the rigid body and deformation of the mesh
because of the waves created in the fluid region. You will record a short animation that can be played
in an MPEG player.
1.
Ensure that Contour 1 is visible in the 3D Viewer (make sure there is a check mark beside Contour
1 in the Outline tree view).
2.
Turn off the visibility of Plane 1 and Default Legend View 1 to better see the movement of the
buoy.
3.
Edit Wireframe and configure the following setting(s):
Tab
Setting
Value
Definition
Show surface mesh
(Selected)
4.
Click Apply.
5.
Click the Timestep Selector
6.
Click Animation
7.
In the Animation dialog box, select the Keyframe Animation option.
8.
Click New
in the toolbar. Select the 1st time step and click Apply.
in the Timestep Selector dialog box.
to create KeyframeNo1.
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
745
Simulating the Buoy with Decoupled Mesh Motion
box. By selecting this check box, the JPEG or PPM files used to encode each frame of
the movie will persist after movie creation; otherwise, they will be deleted.
20. Close the Animation dialog box when the animation is complete.
32.4.3.3. Calculating the Minimum Mesh Face Angle
In this step, you will calculate the Minimum Face Angle of the mesh which is an indicator of the overall
mesh quality during the deformation of the mesh. A Minimum Face Angle of greater than 15° is one
indicator of a good quality mesh. However an angle of between 10° and 15° is also acceptable but may
produce inaccuracies in that region of the mesh during the simulation.
, select the 162nd time step and click Apply.
1.
Click the Timestep Selector
2.
Select Tools > Mesh Calculator or click the Calculators tab and select Mesh Calculator.
3.
Configure the following setting(s):
Tab
Setting
Value
Mesh
Calculator
Function
Minimum Face
Angle
4.
Click Calculate.
5.
When you have finished, close the Timestep Selector dialog box and exit from CFD-Post.
The 162nd time step was chosen arbitrarily to contrast the mesh quality between this simulation and
the following one. In this simulation the Minimum Face Angle during the 162nd time step is approximately
13°.
32.5. Simulating the Buoy with Decoupled Mesh Motion
In this section you will use a subdomain to decouple rotation (that is, to enable independent rotation
of the mesh in each part of the domain). Furthermore, you will edit the domain interface boundaries
to restrict mesh deformation on the outer part of the domain to translational only; the inner cylindrical
part of the domain will rotate and translate at the same rate as the buoy.
32.5.1. Defining the Case Using CFX-Pre
1.
Ensure the following tutorial input file is in your working directory:
• Buoy.cfx
The tutorial input files are available from the ANSYS Customer Portal. To access tutorials and their
input files on the ANSYS Customer Portal, go to http://support.ansys.com/training.
2.
Set the working directory and start CFX-Pre if it is not already running.
For details, see Setting the Working Directory and Starting ANSYS CFX in Stand-alone Mode (p. 3).
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
747
Modeling a Buoy using the CFX Rigid Body Solver
3.
If you want to set up the simulation automatically using a tutorial session file:
a.
Run Buoy_decoupled.pre.
For details, see Playing a Session File (p. 6).
b.
Proceed to Obtaining the Solution Using CFX-Solver Manager (p. 750).
4.
Select File > Open Case.
5.
From your working directory, select Buoy.cfx and click Open.
6.
Select File > Save Case As.
7.
Set File name to Buoy_decoupled.cfx.
8.
Click Save.
32.5.1.1. Creating a Subdomain
The subdomain, domain interfaces, and buoy must share common rigid body characteristics. This is
necessary because the inner cylinder and the rigid body must translate and rotate at the same rate to
properly isolate the motions. All relative movement between the inner cylinder and the buoy will be
eliminated, causing zero mesh deformation within the inner cylinder. A subdomain is not strictly necessary
to decouple rotational motions. However, the subdomain increases the robustness of the simulation
by ensuring that the entire mesh within the inner cylinder has the same physical properties as the rigid
body, not just at the buoy boundary and inner cylinder domain interface (this will be set up in the next
step).
1.
Select Insert > Subdomain from the main menu or click Subdomain
2.
Set the subdomain name to rot_trans and click OK.
3.
Configure the following setting(s):
Tab
Setting
Value
Basic
Settings
Location
B86
Mesh
Motion
Mesh Motion
> Option
.
Rigid Body Solution
Mesh Motion
> Rigid Body
Rigid Body 1
Mesh Motion
> Motion Constraints
(Selected)
Mesh Motion
> Motion Constraints
> Motion Constraints
748
None
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
Simulating the Buoy with Decoupled Mesh Motion
4.
Click OK.
32.5.1.2. Editing the Domain Interfaces
You will edit the domain interfaces to restrict the rotational movement of the mesh surrounding the
subdomain. The mesh that is located on the inner cylindrical domain interface will be assigned the
same physical properties as that of the rigid body.
1.
Edit Simulation > Flow Analysis 1 > buoy > Default Fluid Fluid Interface Side
1.
2.
Configure the following setting(s):
Tab
Setting
Value
Basic
Settings
Location
F74.27[a]
Boundary
Details
Mesh Motion
> Option
Rigid Body Solution
Mesh Motion
> Rigid Body
Rigid Body 1
Mesh Motion
> Motion Constraints
(Selected)
Mesh Motion
> Motion Constraints
> Motion Constraints
Ignore Rotations[b]
a. This is the outer cylindrical domain interface.
b. Ignore Rotations constrains the outer domain interface to only translational
motion.
3.
Click OK.
4.
Edit Simulation > Flow Analysis 1 > buoy > Default Fluid Fluid Interface Side
2.
5.
Configure the following setting(s):
Tab
Setting
Value
Basic
Settings
Location
F89.86[a]
Boundary
Details
Mesh Motion
> Option
Rigid Body Solution
Mesh Motion
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
749
Modeling a Buoy using the CFX Rigid Body Solver
Tab
Setting
Value
> Rigid Body
Rigid Body 1
Mesh Motion
> Motion Constraints
(Selected)
Mesh Motion
> Motion Constraints
> Motion Constraints
None
a. This is the inner cylindrical domain interface.
6.
Click OK.
32.5.1.3. Writing the CFX-Solver Input (.def) File
1.
Click Define Run
2.
Configure the following setting(s):
3.
.
Setting
Value
File name
Buoy_decoupled.def
Click Save.
CFX-Solver Manager automatically starts and, on the Define Run dialog box, Solver Input File is
set.
4.
Quit CFX-Pre, saving the simulation (.cfx) file.
32.5.2. Obtaining the Solution Using CFX-Solver Manager
When CFX-Pre has shut down and the CFX-Solver Manager has started, obtain a solution to the CFD
problem by following the instructions below.
1.
Ensure Define Run is displayed.
Solver Input File should be set to Buoy_decoupled.def.
2.
Click Start Run.
CFX-Solver runs and attempts to obtain a solution. At the end of the run, a dialog box is displayed
stating that the simulation has ended.
3.
Select Post-Process Results.
4.
If using stand-alone mode, select Shut down CFX-Solver Manager.
5.
Click OK.
750
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
Simulating the Buoy with Decoupled Mesh Motion
32.5.3. Viewing the Results Using CFD-Post
In this section, you will create a contour plot of Water at 25 C.Volume Fraction to show the
water content of the fluid region, and to illustrate the interface between the air and water. An animation
will then be created to show the movement of the rigid body in the fluid domain. Furthermore, the
minimum face angle of the mesh will be calculated for comparison purposes between the simulations.
32.5.3.1. Loading a Contour Plot from the State File
In the first part of the tutorial, you created a plane and a contour plot, then saved a state file named
Buoy.cst. You will load the resulting state file so that you do not have to create a new plane and
contour plot:
1.
Select File > Load State and choose the name Buoy.cst.
2.
Click Open.
32.5.3.2. Creating a Keyframe Animation
A short animation of the rigid body and surrounding fluid region, starting from rest and given an initial
velocity, will be created to show the complex motion of the rigid body and deformation of the mesh
because of the waves created in the fluid region. You will record a short animation that can be played
in a MPEG player.
1.
Ensure that Contour 1 is visible in the 3D Viewer (make sure there is a check mark beside Contour
1 in the Outline tree view).
2.
Turn off the visibility of Plane 1 and Default Legend View 1 to better see the movement of the
buoy.
3.
Edit Wireframe and configure the following setting(s):
Tab
Setting
Value
Definition
Show surface mesh
(Selected)
. Select the 1st time step and click Apply.
4.
Click the Timestep Selector
5.
Click Animation
6.
In the Animation dialog box, select the Keyframe Animation option.
7.
Click New
8.
Select KeyframeNo1, then set # of Frames to 93, then press Enter while the cursor is in the # of Frames
box.
in the Timestep Selector dialog box.
to create KeyframeNo1.
Tip
Be sure to press Enter and confirm that the new number appears in the list before
continuing.
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
751
Modeling a Buoy using the CFX Rigid Body Solver
9.
Use the Timestep Selector to load the 280th time step.
to create KeyframeNo2.
10. In the Animation dialog box, click New
11. Ensure that More Animation Options
is pushed down to show more animation settings.
12. Select Loop.
13. Ensure that Repeat forever
(next to Repeat) is not selected (not pushed down).
14. Select Save Movie.
15. Set Format to MPEG1.
16. Set File name to Buoy_decoupled.mpg.
17. If you want to save the animation to a location other than your working directory, click Browse
to Save Movie) to set the path to a different directory and click Save.
(next
The movie filename (including the path) has been set, but the animation has not yet been produced.
18. Click To Beginning
.
This ensures that the animation will begin at the first keyframe.
19. After the first keyframe has been loaded, click Play the animation
.
• The MPEG will be created as the animation proceeds.
20. Close the Animation dialog box when the animation is complete.
32.5.3.3. Calculating the Minimum Mesh Face Angle
In this section you will calculate the Minimum Face Angle of the mesh, which is an indicator of the
overall mesh quality during the deformation of the mesh. A Minimum Face Angle of greater than 15°
is one indicator of a good quality mesh. However an angle of between 10° and 15° is also acceptable
but may produce inaccuracies in that region of the mesh during the simulation.
and load the 162nd time step.
1.
Click the Timestep Selector
2.
Select Tools > Mesh Calculator or click the Calculators tab and select Mesh Calculator.
3.
Configure the following setting(s):
4.
752
Tab
Setting
Value
Mesh
Calculator
Function
Minimum Face
Angle
Click Calculate.
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
Comparing the Two Cases Using CFD-Post
You can also check other time steps to calculate the mesh quality throughout the simulation.
5.
When you have finished, close the Timestep Selector dialog box.
32.6. Comparing the Two Cases Using CFD-Post
In this section you will compare two cases. First, compare the animations:
1.
With Buoy_decoupled_001.res already loaded in CFD-Post, select File > Load Results.
2.
In the Load Results File dialog box, select Keep current cases loaded, then select the file Buoy_001.res.
Click Open.
3.
Click the viewport icon
4.
Click the synchronize active view icon
5.
Right-click within the 3D view and select Predefined Camera > View from +Z to orient the view. Click
Fit View
and select
.
.
to scale the buoy appropriately within the 3D viewer.
6.
In the Outline tree, double-click Case Comparison.
7.
In the Case Comparison editor, select Case Comparison Active, then ensure that both cases are set to
Current Step: 0. Click Apply.
8.
Ensure that in each of the views:
• Contour 1 is visible
• The plane and default legend are hidden
• Wireframe has Show surface mesh selected
Note
To show/hide plots, toggle the check box next to the plot name in the Outline tree
view. This toggles the visibility of the plot in the currently selected view. Because the
synchronization of active views has been enabled, this also modifies the visibility of all
other views to match the currently selected view.
9.
Click the Timestep Selector
10. Click Animation
.
in the Timestep Selector dialog box.
11. In the Animation dialog box, select the Keyframe Animation option.
, because they display the results from only
12. Delete the two existing Keyframes using the delete icon
one results file. Then set up the Keyframe Animation in the same way as for the animations you created
previously in this tutorial.
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
753
Download