Академический Документы
Профессиональный Документы
Культура Документы
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
The rigid body is surrounded by a fluid volume that is part air and part water (both at a static temper-
ature of 25C). 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
Release 17.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
722 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.
Mass moment of inertia (XX, YY, ZZ, XY, XZ, YZ) = (4.5, 2.1, 6.36, 0, 0, 0) [kg m^2]
The first step in solving this problem is to import a pre-existing mesh file into CFX-Pre. A CCL file con-
taining 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 deform-
ation.
If this is the first tutorial you are working with, it is important to review the following topics before
beginning:
ANSYS CFX uses a working directory as the default location for loading and saving files for a par-
ticular 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.
For details, see Setting the Working Directory and Starting ANSYS CFX in Stand-alone Mode (p. 3).
1. If you want to set up the simulation automatically using a tutorial session file:
a. Run Buoy.pre.
6. Click Save.
Setting Value
File name Buoy.gtm
3. Click Open.
Release 17.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
724 of ANSYS, Inc. and its subsidiaries and affiliates.
Simulating the Buoy with Fully Coupled Mesh Motion
Note
The expressions or physics for a simulation can be saved to a CCL file at any time by selecting
File > Export > CCL.
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 expres-
sion. 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.
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
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.
> Air at 25 C
> Water at 25 C
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
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
i. The Displacement Diffusion model for mesh motion preserves the relative mesh
distribution of the initial mesh.
l. 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.
5. Click OK.
Release 17.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
730 of ANSYS, Inc. and its subsidiaries and affiliates.
Simulating the Buoy with Fully Coupled Mesh Motion
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.
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
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.
3. Click OK.
Release 17.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
734 of ANSYS, Inc. and its subsidiaries and affiliates.
Modeling a Buoy using the CFX Rigid Body Solver
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.
> Displacement
> Displacement
> Displacement
> Displacement
Release 17.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
736 of ANSYS, Inc. and its subsidiaries and affiliates.
Simulating the Buoy with Fully Coupled Mesh Motion
> Water at 25 C
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.
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
3. Click OK.
Equation Class
Release 17.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
740 of ANSYS, Inc. and its subsidiaries and affiliates.
Simulating the Buoy with Fully Coupled Mesh Motion
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.
3. Click OK.
3. In the Transient Results editor, click Add new item , set Name to Transient Results 1, and
click OK.
Setting Value
Transient Results 1
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
a. To create a new item, you must first click the Add new item icon, then enter the name as required
and click OK.
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.
Setting Value
File name Buoy.def
3. Click Save.
CFX-Solver Manager automatically starts and, on the Define Run dialog box, Solver Input File is
set.
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
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.
5. Click OK.
Release 17.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
744 of ANSYS, Inc. and its subsidiaries and affiliates.
Simulating the Buoy with Fully Coupled Mesh Motion
4. Click Apply.
7. Click Apply.
8. Select File > Save State and choose the name Buoy.cst.
9. Click Save.
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.
4. Click Apply.
5. Click the Timestep Selector in the toolbar. Select the 1st time step and click Apply.
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.
1. Click the Timestep Selector , select the 162nd time step and click Apply.
2. Select Tools > Mesh Calculator or click the Calculators tab and select Mesh Calculator.
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.
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.
8. Click Save.
1. Select Insert > Subdomain from the main menu or click Subdomain .
Release 17.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
748 of ANSYS, Inc. and its subsidiaries and affiliates.
Simulating the Buoy with Decoupled Mesh Motion
4. Click OK.
1. Edit Simulation > Flow Analysis 1 > buoy > Default Fluid Fluid Interface Side
1.
3. Click OK.
4. Edit Simulation > Flow Analysis 1 > buoy > Default Fluid Fluid Interface Side
2.
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
6. Click OK.
Setting Value
File name Buoy_decoupled.def
3. Click Save.
CFX-Solver Manager automatically starts and, on the Define Run dialog box, Solver Input File is
set.
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.
5. Click OK.
Release 17.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
750 of ANSYS, Inc. and its subsidiaries and affiliates.
Simulating the Buoy with Decoupled Mesh Motion
1. Select File > Load State and choose the name Buoy.cst.
2. Click Open.
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.
4. Click the Timestep Selector . Select the 1st time step and click Apply.
8. Select KeyframeNo1, then set # of Frames to 93, then press Enter while the cursor is in the # of Frames
box.
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
11. Ensure that More Animation Options is pushed down to show more animation settings.
13. Ensure that Repeat forever (next to Repeat) is not selected (not pushed down).
17. If you want to save the animation to a location other than your working directory, click Browse (next
to Save Movie) to set the path to a different directory and click Save.
The movie filename (including the path) has been set, but the animation has not yet been produced.
This ensures that the animation will begin at the first keyframe.
19. After the first keyframe has been loaded, click Play the animation .
20. Close the Animation dialog box when the animation is complete.
1. Click the Timestep Selector and load the 162nd time step.
2. Select Tools > Mesh Calculator or click the Calculators tab and select Mesh Calculator.
4. Click Calculate.
Release 17.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
752 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.
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.
5. Right-click within the 3D view and select Predefined Camera > View from +Z to orient the view. Click
7. In the Case Comparison editor, select Case Comparison Active, then ensure that both cases are set to
Current Step: 0. Click Apply.
Contour 1 is visible
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.
11. In the Animation dialog box, select the Keyframe Animation option.
12. Delete the two existing Keyframes using the delete icon , because they display the results from only
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