ACU-T: 5201 Coupled Simulation of a Check Valve using AcuSolve and MotionSolve

AcuSolve has the capability to solve problems with fluid-structure interactions, as shown in ACU-T: 5200 Rigid-Body Dynamics of a Check Valve. It can also be coupled with external codes, such as MotionSolve, in cases where the built-in capabilities of AcuSolve do not fully represent the physics of interest, such as a collision between solid bodies.

This tutorial provides the instructions for setting up, solving, and viewing results for a simulation of the opening of a pressure check valve. In this simulation, AcuSolve is used to compute the forces on the valve due to the time-varying inlet flow field and MotionSolve is used to compute the motion of the valve that results from these flow forces. This tutorial is designed to introduce you to a number of modeling concepts necessary to perform simulations of rigid-body dynamics and coupling with MotionSolve. An important feature of the AcuSolve-MotionSolve coupling is the ability to simulate contact between solid bodies, which is demonstrated in this tutorial through the collision of the valve with the valve seat.

The basic steps in any CFD simulation are shown in ACU-T: 2000 Turbulent Flow in a Mixing Elbow. The following additional capabilities of AcuSolve are introduced in this tutorial:
  • Coupled solution with external code (MotionSolve)
  • Fluid-structure interaction
  • Mesh motion
  • Transient simulation
  • Use of a multiplier function to scale inlet boundary conditions
  • Post-processing with AcuProbe
  • Results animation

Prerequisites

You should have already run through the introductory tutorial, ACU-T: 2000 Turbulent Flow in a Mixing Elbow. It is assumed that you have some familiarity with AcuConsole, AcuSolve, and AcuFieldView. You will also need access to licensed versions of AcuSolve and MotionSolve.

Prior to running through this tutorial, copy AcuConsole_tutorial_inputs.zip from <Altair_installation_directory>\hwcfdsolvers\acusolve\win64\model_files\tutorials\AcuSolve to a local directory. Extract the Pressure_Check_Valve-Coupled\ directory and its contents from AcuConsole_tutorial_inputs.zip. This directory contains the geometry model in Parasolid ASCII format, pressureCheckValve.x_t, as well as the prepared MotionSolve model, Valve_model.xml.

Analyze the Problem

An important first step in any CFD simulation is to examine the engineering problem to be analyzed and determine the settings that need to be provided to AcuSolve. Settings can be based on geometrical components (such as volumes, inlets, outlets, or walls) and on flow conditions (such as fluid properties, velocity, or whether the flow should be modeled as turbulent or as laminar).

The problem to be addressed in this tutorial is shown schematically in Figure 1. It consists of a cylindrical pipe containing water that flows past a check valve with a shutter attached to a virtual spring (not included in the geometry). The inlet pressure varies over time and the movement of the shutter will be determined as a function of the balance of the fluid forces against the reactive force of the spring. The problem is rotationally periodic at 30° increments about the longitudinal axis, and it is assumed that the resulting flow is also rotationally periodic, allowing for modeling with the use of a wedge-shaped section. For this tutorial, a 30° section of the geometry is modeled, as shown in the figure. Modeling a portion of an rotationally periodic geometry leads to reduced computation time while still providing an accurate solution.



Figure 1. Schematic of Check Valve with Spring-Loaded Shutter

Details of the problem characteristics are shown in the following images extracted from a sample worksheet that was created prior to setting up the case for AcuSolve.

The pipe has an inlet diameter of 0.08 m and is 0.4 m long. The check-valve assembly is 0.085 m downstream of the inlet. It consists of a plate 0.005 m thick with a centered orifice 0.044 m in diameter and a shutter with an initial position 0.005 m from the opening, simulating a nearly closed condition. The shutter plate is 0.05 m in diameter and 0.005 m thick. The shutter plate is attached to a stem 0.03 m long and 0.01 m in diameter. The mass of the shutter and stem is 0.2 kg and its motion is affected by a virtual spring with a stiffness of 2162 N/m. The motion of the valve shutter is limited by a stop mounted on a perforated plate downstream of the shutter.



Figure 2.

Modeling the geometry as a 30° section requires that the fluid model is set up to be consistent with the rigid-body model. Since only 1/12 of the rigid body is modeled, the forces computed by AcuSolve that act on the valve shutter represent 1/12 of the actual force on the device. The rigid-body-dynamics model was set up in MotionSolve with scaled settings of mass and spring stiffness to account for the fact that you are only modeling a small section of the full geometry. Additional information regarding the setup of this problem in MotionSolve is provided in the MotionSolve documentation.

The fluid in this problem is water, which has a density (ρ) of 1000 kg/m3 and a molecular viscosity (μ) of 1 X 10-3 kg/m-sec, as shown in the worksheet.



Figure 3.

At the start of the simulation the flow field is stationary. Flow is driven by the pressure at the inlet, which varies over time as a piecewise linear function shown in Figure 4. As the pressure at the inlet rises, the flow will accelerate as the valve opens. The turbulence viscosity ratio is assumed to be 10.

The initial inlet pressure is 0 Pa. At 0.002 s the pressure begins to ramp up and reaches 29,000 Pa at 0.05 s. The pressure is held at 29,000 Pa and begins to ramp back down starting at 0.2 s, reaching the initial pressure at 0.25 s where it remains for the rest of the simulation.


Figure 4. Transient pressure at the inlet
Prior simulations of this geometry indicate that the average velocity at the inlet reaches a maximum of 0.98 m/s. At this velocity, the Reynolds number for the flow is 78,400. When the Reynolds number is above 4,000 it is generally accepted that flow should be modeled as turbulent.


Figure 5.

Note that the initial conditions of the flow are actually laminar, however, the increase in flow velocity and flow around the valve shutter is expected to cause a rapid transition to turbulent conditions. Therefore, the simulation will be set up to model transient, turbulent flow. When performing a transient analysis, convergence is achieved at every time step based on the defined stagger criteria. Mesh motion will be modeled using arbitrary mesh movement (arbitrary Lagrangian-Eulerian mesh motion).



Figure 6.
For this case, the transient behavior of interest occurs in the time it takes for the pressure to ramp up and ramp back down, which is given by the transient pressure profile. To allow time for the spring to recover additional time will be simulated. For this tutorial 0.1 s is added after the pressure drops back to initial conditions for a total duration of 0.35 s.


Figure 7.

Another critical decision in a transient simulation is choosing the time increment. The time increment is the change in time during a given time step of the simulation. It is important to choose a time increment that is short enough to capture the changes in flow properties of interest, but does not require unnecessary computation time.

There are two methods commonly used for determining an appropriate time increment. The first method involves identification of the time scales of the transient behaviors of interest and setting the time increment to sufficiently resolve those behaviors. The second method involves setting a limit on the number of mesh elements that the flow can cross in a given time step. A convenient metric for the number of mesh elements crossed per time step is the Courant-Friederichs-Lewy number, or CFL number. With this method, the time increment can be computed from the mesh size, the flow velocity and the desired CFL number.

The change in inlet pressure from initial conditions to maximum occurs over 0.048 s. A time increment of 0.002 s would allow for excellent resolution of the transient changes without requiring excessive computational time. This time increment would result in a CFL number of 0.36, indicating that it would take approximately three time steps for flow to cross a single mesh element. While the time increment could be raised and still maintain a favorable CFL number, the value of 0.002 s is chosen to better resolve the transient changes resulting from the sudden pressure shifts.


Figure 8.
In addition to setting appropriate conditions to capture the physics of the simulation, it is important to generate a mesh that is sufficiently refined to provide good results. In this tutorial the global mesh size is set to provide at least 50 mesh elements around the circumference of the inlet, resulting in a mesh size of 0.005 m. This mesh size was chosen to provide a quick turnaround time for the model. For real-world simulations, you would modify your mesh settings after an initial solution until a mesh-independent solution is reached, that is, a solution that does not change with further mesh refinement.


Figure 9.

AcuSolve allows for mesh refinements in a user-defined region that is independent of geometric components of the problem such as volumes, model surfaces or edges. It is useful to refine the mesh in areas where gradients in pressure, velocity, eddy viscosity and the like are steep.

For this problem it is desirable to resolve flow characteristics near the gap between the valve opening and the shutter. It would also be desirable to be able to resolve flow characteristics around the complete valve body. The mesh size for the region around the gap will be sized to allow for at least three cells to span the gap in the initial position. The mesh around the full valve body will be sized so that the average cell size will be one half of the global mesh size. This local mesh refinement is accomplished using mesh refinement zones.


Figure 10.

Once a solution is calculated, the flow properties of interest are the displacement of the moving surface, velocity of the moving surface, mass flow rate at the outlet, pressure contours on the symmetry plane and velocity vectors on the symmetry plane.

Define the Simulation Parameters

Start AcuConsole and Create the Simulation Database

This tutorial walks you through the process of setting up and solving a fluid-structure simulation of a spring-loaded check valve subjected to changes in inlet pressure using AcuSolve, to solve the fluid flow, coupled with MotionSolve, to solve the rigid-body dynamics.

In this tutorial, you will begin by creating a database, populating the geometry-independent settings, setting parameters for coupling with MotionSolve, loading the geometry, creating groups, setting group attributes, adding geometry components to groups, creating a multiplier function, and assigning mesh controls and boundary conditions to the groups. Next you will generate a mesh and run AcuSolve and MotionSolve to simulate the transient behavior. You will use AcuProbe to post-process mesh displacement and mass flow. Finally, you will visualize the results using AcuFieldView.

In the next steps you will start AcuConsole, create the database for storage of AcuConsole settings, and set the location for saving mesh and solution information for AcuSolve.

  1. Start AcuConsole from the Windows Start menu by clicking Start > Altair <version> > AcuConsole.
  2. Click the File menu, then click New to open the New data base dialog.
  3. Browse to the location that you would like to use as your working directory.
    This directory is where all files related to the simulation will be stored. The AcuConsole database file (.acs) is stored in this directory. Once the mesh and solution are created, additional files and directories will be created within this directory.
  4. Create a new folder named Check_Valve_Coupled and open this folder.
  5. Enter Check_Valve_Coupled as the file name for the database.
    Note: In order for other applications to be able to read the files written by AcuConsole, the database path and name should not include spaces.
  6. Click Save to create the database.

Set General Simulation Parameters

In the next steps you will set attributes that apply globally to the simulation. To simplify this task, you will use the BAS filter in the Data Tree Manager. The BAS filter limits the options in the Data Tree to show only the basic settings.

The general attributes that you will set for this tutorial are for turbulent flow, transient time analysis, arbitrary mesh movement, and the use of an external code (MotionSolve).

  1. Click BAS in the Data Tree Manager to switch to basic view in the Data Tree.


    Figure 11.
  2. Double-click the Global Data Tree item to expand it.
    Tip: You can also expand a tree item by clicking next to the item name.


    Figure 12.
  3. Double-click Problem Description to open the Problem Description detail panel.
  4. Enter AcuSolve Tutorial as the Title for this case.
  5. Enter Pressure Check Valve - Coupled MotionSolve as the Sub title for this case.
  6. Change the Analysis type to Transient.
  7. Set the Turbulence equation to Spalart Allmaras.
    The robustness and accuracy of the Spalart Allmaras turbulence model makes it an excellent choice for simulation of transient flows.
  8. Change the Mesh type to Arbitrary Mesh Movement (ALE).
  9. Turn External code on.
    This indicates that AcuSolve will send and receive information from another solver. You will configure the communication between the codes later in this tutorial.


    Figure 13.

Set Solution Strategy Parameters

In the next steps you will set attributes that control the behavior of AcuSolve as it progresses during the transient solution.



Figure 14.
  1. Double-click Auto Solution Strategy in the Data Tree to open the Auto Solution Strategy detail panel.
  2. Enter 0 for Max time steps.
    This value indicates that AcuSolve should ignore this setting and calculate the maximum number of time steps based on the final time and the time increment.
  3. Enter 0.35 sec for the Final time.
  4. Enter 0.002 sec for the Initial time increment.
    Important: The value entered here must match the print_interval setting in the prepared MotionSolve model, Valve_model.xml, to ensure that the two solvers stay synchronized during the solution process.
  5. Enter 3 for Max stagger iterations.
    This setting determines the maximum number of iterations that will be performed within each time step.


    Figure 15.

Set Material Model Parameters

AcuConsole has three pre-defined materials, Air, Aluminum and Water.

In the next steps you will verify that the pre-defined material properties of water match the desired properties for this problem.



Figure 16.
  1. Double-click Material Model in the Data Tree to expand it.


    Figure 17.
  2. Double-click Water in the Data Tree to open the Water detail panel.
  3. Click the Density tab. Verify that the density of water is 1000.0 kg/m3.
  4. Click the Viscosity tab. Verify that the viscosity of water is 0.001 kg/m-sec.

Set External Code Parameters for Communication with MotionSolve

In the next steps you will provide the settings that will allow AcuSolve and MotionSolve to communicate during the solution process. In this simulation, MotionSolve is being used to calculate the motion of the valve in response to the fluid loads calculated by AcuSolve. In order to achieve this, AcuSolve and MotionSolve will communicate through a socket connection. This communication approach enables the two codes to be run on separate machines and even different operating systems.

  1. Click ALL in the Data Tree Manager to show all settings.
  2. Double-click External Code Parameters under Global to open the External Code Parameters detail panel.
  3. Set Communication to Socket.
  4. Turn Socket initiate off.
    This setting indicates that the external code (MotionSolve) will open the socket and AcuSolve will "listen" for a connection on the indicated socket port.
  5. Enter localhost as the Socket host.
    This indicates that AcuSolve and MotionSolve are running on the same machine. If MotionSolve was running on a different machine, the host name or IP address would need to be supplied here.
  6. Enter 48000 as the Socket port.
    This is the default port used for communication between AcuSolve and MotionSolve.


    Figure 18.

Import the Geometry and Define the Model

Import the Check Valve Geometry

You will import the geometry in the next part of this tutorial. You will need to know the location of pressureCheckValve.x_t in order to complete these steps. This file contains information about the geometry in Parasolid ASCII format.
  1. Click File > Import.
  2. Browse to the directory containing pressureCheckValve.x_t.
  3. Change the file name filter to Parasolid File (*.x_t *.xmt *X_T …).
  4. Select pressureCheckValve.x_t and click Open to open the Import Geometry dialog.


    Figure 19.

    For this tutorial, the default values for the Import Geometry dialog are used to load the geometry. If you have previously used AcuConsole, be sure that any settings that you might have altered are manually changed to match the default values shown in the figure. With the default settings, volumes from the CAD model are added to a default volume group. Surfaces from the CAD model are added to a default surface group. You will work with groups later in this tutorial to create new groups, set flow parameters, add geometric components, and set meshing parameters.

  5. Click Ok to complete the geometry import.


    Figure 20.

    The color of objects shown in the modeling window in this tutorial and those displayed on your screen may differ. The default color scheme in AcuConsole is "random," in which colors are randomly assigned to groups as they are created. In addition, this tutorial was developed on Windows. If you are running this tutorial on a different operating system, you may notice a slight difference between the images displayed on your screen and the images shown in the tutorial.

Create Multiplier Function for Inlet Pressure

AcuSolve provides the ability to scale values as a function of time and/or time step during a simulation. This is achieved through the use of a multiplier function. In this tutorial, the inlet stagnation pressure varies as the simulation progresses. By taking advantage of multiplier functions, you can easily set up a function to model the pressure changes at the inlet.

In the next steps you will create a multiplier function for the pressure at the inlet. This multiplier function will be applied to the inlet later in this tutorial.

In this tutorial, the inlet pressure starts at 0 pascals, ramps up to 29,000 Pa, is held steady briefly, and then ramps back to 0 Pa.


Figure 21.

To make the creation of the multiplier functions as simple as possible, you will use the PB* filter in the Data Tree Manager.

  1. Click PB* in the Data Tree Manager to show all problem-definition settings.
  2. Right-click Multiplier Function under Global in the Data Tree and click New to create a new multiplier function.
  3. Rename the multiplier function.
    1. Right-click the newly created Multiplier Function 1 and click Rename.
    2. Enter inlet pressure.
      Note: When an item in the Data Tree is renamed, the change is not saved until you press the Enter key on your keyboard. If you move the input focus away from the item without entering it, your changes will be lost.
    3. Double-click inlet pressure to open the multiplier function detail panel.
  4. Set the Type to Piecewise Linear.
  5. Set the Curve fit variable to Time.
  6. Check that the Evaluation type is set to Per Time Step.
    This value indicates that AcuSolve should evaluate the multiplier function once for each time step.


    Figure 22.
  7. Add the function values for the inlet pressure profile.
    1. Click Open Array to open the Array Editor dialog.
    2. Click Add five times to add five new rows.
    3. Enter the following values for X (time) and Y (pressure).
      X Y
      0.0 0.0
      0.002 0.0
      0.05 29000
      0.2 29000
      0.25 0.0
      0.35 0.0


      Figure 23.
    4. Click Plot to expand the Array Editor dialog to display the plot of the curve fit values.
      You may need to expand the dialog by dragging the right edge in order to see the plot.


      Figure 24.
    5. Click OK.
    These entries will be used to control the change in inlet pressure throughout the simulation.

Apply Volume Parameters

Volume groups are containers used for storing information about volumes. This information includes the list of geometric volumes associated with the container, as well as attributes such as material models and mesh sizing information.

When the geometry was imported into AcuConsole, all volumes were placed into the "default" volume container.

In the next steps you will rename the default volume group and set the material for the volume as water.

  1. Click BAS in the Data Tree Manager to switch to basic view in the Data Tree.
  2. Expand the Model tree item by clicking .
  3. Expand Volumes.
  4. Rename the default volume to Fluid.
    1. Right-click default under Volumes and click Rename on the context menu.
    2. Enter Fluid.
  5. Set the material model used for the fluid in the simulation.
    1. Expand the Fluid tree item by clicking .
    2. Double-click Element Set to open the Element Set detail panel.
    3. Click the drop-down control next to Material model.
    4. Click Water.


    Figure 25.
For the next set of steps it is useful to turn off the display of Fluid by clicking so that it is in the off () state.

Create Surface Groups and Apply Surface Attributes

Surface groups are containers used for storing information about a surface. This information includes the list of geometric surfaces associated with the container, as well as attributes such as boundary conditions, surface outputs, and mesh sizing information.

In the next steps you will define surface groups, assign the appropriate attributes for each group in the problem, and add surfaces to the groups.

Set Inflow Boundary Conditions for the Inlet

In the next steps you will define a surface group for the inlet, assign the multiplier function to describe the transient pressure, and add the inlet from the geometry to the surface group.

  1. Create a new surface group.
    1. Right-click Surfaces in the Data Tree.
    2. Click New.
  2. Rename the surface to Inlet .
  3. Expand the Inlet surface in the tree.
  4. Double-click Simple Boundary Condition to open the detail panel.
  5. Turn Advanced features On.
    This will expose the Stagnation pressure multiplier function control that you will use to associate the multiplier function with the inlet.
  6. Change the Type to Inflow.
  7. Change the Inflow type to Stagnation Pressure.
  8. Set the Stagnation pressure to 1.0 N/m2.
  9. Set the Stagnation pressure multiplier function to use the inlet pressure function to apply the transient pressure at the inlet.
  10. Set Turbulence input type to Viscosity Ratio.
    When using this setting, AcuSolve will calculate the eddy viscosity based on the material model and the ratio of turbulent to laminar viscosity.
  11. Set the Turbulence viscosity ratio to 10.


    Figure 26.
  12. Add a geometry surface to the Inlet group.
    1. Right-click Inlet and click Add to.
    2. Rotate the geometry by Ctrl+left-clicking near the left side of the geometry and dragging the cursor to the right.
    3. Click the inlet face.


      Figure 27.

      At this point the inlet should be highlighted

    4. Click Done to add this geometry surface to the Inlet surface group.

Set Outflow Boundary Conditions for the Outlet

In the next steps you will define a surface group for the outlet, assign the appropriate attributes and add the outlet from the geometry to the surface group.

  1. Create a new surface group.
  2. Rename the surface to Outlet.
  3. Expand the Outlet surface in the tree.
  4. Double-click Simple Boundary Condition to open the detail panel.
  5. Change the Type to Outflow.
  6. Add a geometry surface to the Outlet surface container.
    1. Right-click Outlet and click Add to.
    2. Rotate the model to expose the outlet by Ctrl+left-clicking near the right end of the geometry and moving the cursor toward the left.
    3. Click on the outlet face.


      Figure 28.

      At this point, the outlet should be highlighted.

    4. Click Done to associate this geometry surface with the surface settings of the Outlet group.

Set Symmetry Boundary Conditions for the Symmetry Planes

The problem is rotationally periodic, allowing for modeling with the use of a section. For this tutorial, a 30-degree section of the geometry is modeled. In order to take advantage of this, the front and rear faces of the section can be identified as symmetry planes, because the non-streamwise flow contribution is minimal. The symmetry boundary condition enforces constraints such that the flow field from one side of the plane is a mirror image of that on the other side.

In the next steps you will define a surface group for the symmetry plane on the front of the modeled section, and then create a second surface group for the back symmetry plane.

  1. Create a new surface group.
  2. Rename the surface to Front symmetry.
  3. Double-click Simple Boundary Condition under Front symmetry to open the Simple Boundary Condition detail panel.
  4. Change the Type to Symmetry.
  5. Change the Mesh displacement BC type to Slip.
    This allows the mesh to move freely along the plane.
  6. Turn off the display of all surface items except Front symmetry and default.


    Figure 29.
  7. Add geometry surfaces to this group.
    1. Right-click Front symmetry and click Add to.
    2. Click the symmetry plane near the inlet and near the outlet.


      Figure 30.

      At this point, the front symmetry plane should be highlighted.

    3. Click Done to add these geometry surfaces to the Front symmetry surface group.
  8. Create a new surface group.
  9. Rename the surface to Back symmetry.
  10. Double-click Simple Boundary Condition under Back Symmetry to open the Simple Boundary Condition detail panel.
  11. Change the Type to Symmetry.
  12. Change the Mesh displacement BC type to Slip.
    This allows the mesh to move freely along the plane.


    Figure 31.
  13. Turn off the display of all surface items except Back Symmetry and default.
  14. Add geometry surfaces to this group.
    1. Right-click Back symmetry and click Add to.
    2. Click the symmetry plane near the inlet and near the outlet.


      Figure 32.

      At this point, the back symmetry plane should be highlighted.

    3. Click Done to add these geometry surfaces to the Back symmetry surface group.

Set External Code Surface Attributes for the Valve Shutter Walls

The motion of this surface, resulting from the transient inlet pressure, will be modeled with MotionSolve. In the next steps you will define a surface group for the walls of the valve shutter, assign the appropriate settings, and add the faces from the geometry to the surface group.
  1. Click ALL in the Data Tree Manager to show all settings.
  2. Create a new surface group.
  3. Rename the surface to Valve wall.
  4. Disable Simple Boundary Condition for Valve wall.
  5. Enable External Code Surface.
    Disabling the boundary condition options and enabling external code options indicates that boundary conditions will be handled by the external code (MotionSolve).
  6. Set Coupling type to Rigid Body.
    This indicates that the external code will provide rigid-body information for this surface.
  7. Enter Model-Shutter Body for Rigid body name.
    The name entered here needs to match the body name in the prepared MotionSolve model, Valve_model.xml, to ensure that information about forces and motion of this surface match up between AcuSolve and MotionSolve.


    Figure 33.
  8. Restore the initial view by clicking on the View Manager toolbar. .
  9. Zoom in on the portion of the geometry that represents the valve shutter and stem by using the right-mouse button or on the View Manager toolbar.
  10. Rotate the view by left-clicking above the model and dragging the cursor down and to the right to expose the shutter and stem walls.


    Figure 34.
  11. Turn off the display of all surface items except Valve wall and default.
  12. Add geometry surfaces to this group.
    1. Right-click Valve wall and click Add to.
    2. Hold the Shift key down, left-click, and drag a selection box (rubber band) around the valve and stem.


      Figure 35.
    3. Release the left key and the valve shutter and stem should be highlighted.


      Figure 36.
    4. Click Done to add these geometry surfaces to the Valve wall surface group.

Set Wall Boundary Conditions for the Pipe Walls

When the geometry was loaded into AcuConsole, all geometry surfaces were placed in the default surface group. In the previous steps, you selected geometry surfaces to be placed in the groups that you created. At this point, all that is left in the default surface group is the pipe wall. Rather than create a new container, add the wall surfaces in the geometry to it, and then delete the default surface container, you will rename the existing container.

  1. Rename the default surface to Pipe wall.
  2. Double-click Simple Boundary Condition under Pipe wall to open the detail panel.
    The default wall settings will be used for the pipe wall.


    Figure 37.

Set Nodal Output Frequency

In the next steps you will set an attribute that impacts how often results from the transient simulation are written to disk. The results can be used to create an animation of the simulation once the run has completed. Writing the results after every time step produces a collection of output states that allows for the best visual resolution of the contact between the valve and valve stop.
  1. Double-click Output under Global in the Data Tree to expand it.
  2. Double-click Nodal Output to open the Nodal Output detail panel.
  3. Enter 1 as the Time step frequency.
    This value indicates that AcuSolve should write results after every time step.


    Figure 38.

Assign Mesh Controls

Set Global Meshing Parameters

Now that the simulation has been defined, attributes need to be added to define the mesh sizes that will be created by the mesher.

AcuConsole supports three levels of meshing control, global, zone and geometric.
  • Global mesh controls apply to the whole model without being tied to any geometric component of the model.
  • Zone mesh controls apply to a defined region of the model, but are not associated with a particular geometric component.
  • Geometric mesh controls are applied to a specific geometric component. These controls can be applied to volume groups, surface groups, or edge groups.

In the next steps you will set global meshing attributes. In subsequent steps you will create zone and surface meshing attributes.

  1. Click MSH in the Data Tree Manager to filter the settings in the Data Tree to show only the controls related to meshing.
  2. Double-click the Global Data Tree item to expand it.
  3. Double-click Global Mesh Attributes to open the detail panel.
  4. Change the Mesh size type to Absolute.
  5. Enter 0.005 m for the Absolute mesh size.
    This absolute mesh size is chosen to ensure that there are at least 50 mesh elements around the circumference of the main pipe.
  6. Turn off the Curvature refinement parameters option.
  7. Change the Mesh growth rate to 1.2.
    This option controls that rate at which the mesh transitions between regions of different surface and volume size. Setting this to a value of 1.2 allows for a gradual transition between finely meshed regions and coarsely meshed regions.
  8. Set the Maximum sweep angle to 30.0 degrees.
    This option allows you to set the maximum sweep angle for edge-blend meshing on a global basis, which creates a radial array of elements around sharp edges to provide better resolution of the flow features. The sweep angle is used to control how many degrees each radial division spans.


    Figure 39.

Set Zone Meshing Parameters

In addition to setting meshing characteristics for the whole problem, you can assign meshing attributes to a zone within the problem where you want to be able to resolve flow with a mesh that is more refined than the global mesh. A zone mesh refinement can be created using basic shapes to control the mesh size within that shape. These types of mesh refinement are used when refinement is needed in an area that does not correspond to a geometric item.

In the following steps you will add mesh refinements in the zone around the valve gap and around the valve body.

Set Zone Meshing Parameters for the Gap

In the next steps you will add a set of mesh attributes for a zone around the gap between the valve shutter and the orifice.

  1. Turn off the display of Volumes.
  2. Turn off the display of all surfaces except Valve wall and Pipe wall.
  3. Restore the initial view by clicking on the View Manager toolbar.
  4. Right-click Zone Mesh Attributes under the Global branch in the Data Tree and click New.
  5. Rename Zone Mesh Attributes 1 to Gap mesh refinement.
  6. Double-click Gap mesh refinement to open the Zone Mesh Attributes detail panel.
  7. Change the Mesh zone type to Cylinder.
  8. Set the location of the mesh refinement by defining the center points of the end faces of the cylinder.
    1. Click Open Array to open the Array Editor dialog.
    2. Enter -0.05 for X-coordinate 1.
    3. Enter -0.03 for X-coordinate 2.
    4. Enter 0.025 for Y-coordinate 1 and 2.
    5. Enter 0.0 for Z-coordinate 1 and 2.
    6. Click OK.
  9. Enter 0.01 m for the Radius.
    This radius is used to define a cylinder that encloses the gap in the modeled section of the check valve.
  10. Enter 0.0015 m for the Mesh size.
    This will result in a zone where the mesh size provides at least three cells between the shutter and the edge of the orifice in the initial position.


    Figure 40.


    Figure 41.

Set Zone Meshing Parameters for the Valve Body

In the next steps you will add a set of mesh attributes for a zone around the valve body.

  1. Right-click Zone Mesh Attributes under the Global branch in the Data Tree and click New.
  2. Rename Zone Mesh Attributes 1 to Valve body mesh refinement.
  3. Double-click Valve body mesh refinement to open the Zone Mesh Attributes detail panel.
  4. Change the Mesh zone type to Cylinder.
  5. Set the location of the mesh refinement by defining the center points of the end faces of the cylinder.
    1. Click Open Array to open the Array Editor dialog.
    2. Enter -0.06 for X-coordinate 1.
    3. Enter 0.04 for X-coordinate 2.
    4. Enter 0.02 for Y-coordinate 1 and 2.
    5. Enter 0.0 for Z-coordinate 1 and 2.
    6. Click OK.
  6. Enter 0.021 m for the Radius.
    This radius is used to define a cylinder that encloses the gap in the modeled section of the check valve.
  7. Enter 0.0025 m for the Mesh size.
    This will result in a zone where the mesh size is half of the global mesh size.


    Figure 42.


    Figure 43.

Set Meshing Attributes for Surface Groups

In the following steps you will set meshing attributes that will allow for localized control of the mesh size on surface groups that you created earlier in this tutorial. Specifically, you will set local meshing attributes that control the growth of boundary layer elements normal to the surfaces of the pipe walls and valve walls.

Set Surface Meshing Attributes for the Pipe Walls

In the next steps you will set meshing attributes that allow for localized control of the mesh near the walls of the pipe. The mesh size on the wall of the pipe will be inherited from the global mesh size that was defined earlier. The settings that follow will only control the growth of the boundary layer from the walls of the pipe into the fluid volume.

  1. Expand the Model > Surfaces > Pipe wall tree item.
  2. Click the check box next to Surface Mesh Attributes to enable the settings and open the Surface Mesh Attributes detail panel.
  3. Change the Mesh size type to None.
    This option indicates that the mesher will use the global meshing attributes when creating the mesh on the surface of the pipe walls.
  4. Turn on the Boundary layer flag option.

    This option allows you to define how the meshing should be handled in the direction normal to the walls.

  5. Set the Resolve option to Total Layer Height.
    Mesh elements for a boundary layer are grown in the normal direction from a surface to allow effective resolution of the steep gradients near no-slip walls. The layers can be specified using a number of different options. In this tutorial you will specify the height of the first layer, a stretch ratio for successive layers (growth rate), and the total number of layers to generate. AcuConsole will resolve the total layer height from the attributes that you provide. That is, total layer height will be computed based on the height of the first element, the growth rate, and the number of layers that you provide in the next few steps.
  6. Enter 0.00035 m for First element height.
  7. Enter 1.2 for the Growth rate.
  8. Enter 3 for the Number of layers.
  9. Turn on the Boundary layer blends flag option.
    This option creates a radial array of boundary layer elements around exterior corners.
  10. Enter 30.0 degrees as the Maximum sweep angle.


    Figure 44.

Set Surface Meshing Attributes for the Valve Walls

In the next steps you will set meshing attributes that allow for localized control of the mesh size near the walls of the valve shutter assembly.

  1. Expand the Model > Surfaces > Valve wall tree item.
  2. Click the check box next to Surface Mesh Attributes to enable the settings and open the Surface Mesh Attributes detail panel.
  3. Change the Mesh size type to None.
  4. Turn on the Boundary layer flag option.
  5. Set the Resolve option to Total Layer Height.
  6. Enter 0.00015 m for First element height.
  7. Enter 1.2 for the Growth rate.
  8. Enter 3 for the Number of layers.
  9. Turn on the Boundary layer blends flag option.
    This option creates a radial array of boundary layer elements around exterior corners.
  10. Enter 30.0 degrees as the Maximum sweep angle.


    Figure 45.

Generate the Mesh

In the next steps you will generate the mesh that will be used when computing a solution for the problem.

  1. Click on the toolbar to open the Launch AcuMeshSim dialog.
  2. Click Ok to begin meshing.

    During meshing an AcuTail window opens. Meshing progress is reported in this window. A summary of the meshing process indicates that the mesh has been generated.



    Figure 46.
  3. Display the mesh on surfaces.
    1. Right-click Zone Mesh Attributes under Global in the Data Tree and click Display off.
    2. Right-click Volumes in the Data Tree and click Display off.
    3. Right-click Surfaces in the Data Tree and click Display on.
    4. Right-click Surfaces in the Data Tree, select Display type and click solid & wire.
  4. Rotate, move, or zoom the view to examine the mesh.
  5. Turn off the display of Gap mesh refinement and Valve wall mesh refinement under Global > Zone Mesh Attributes by clicking next to the surface so that it is in the display off state ().

    Details of the mesh on the front symmetry plane are shown below. This view was obtained by reorienting the view with on the View Manager toolbar, then zooming in on the model.



    Figure 47. Mesh Details Around the Valve Viewed on the Front Symmetry Plane

    Note that the mesh size in the pipe decreases from left to right in the transition from a region where global settings determine the size to the zone around the gap where the settings are for a finer mesh. Note also that the mesh to the right of the valve shutter is smaller than the global mesh as determined in the Valve body mesh refinement that you created.

Compute the Solution and Review the Results

Solve the Problem

This tutorial uses a coupled solution between AcuSolve for the flow field and MotionSolve for the rigid-body-dynamics. Solving the problem for this tutorial involves two steps:
  1. Start AcuSolve.
  2. Start MotionSolve.

The next sets of steps provide instructions for these two tasks.

Run AcuSolve

In the next steps you will launch AcuSolve to compute the solution for this case.

  1. Click on the toolbar to open the Launch AcuSolve dialog.
  2. Enter 4 for Number of processors, if your system has four or more processors.
    The use of multiple processors can reduce solution time.
  3. Accept all other default settings.
    Based on these settings, AcuConsole will generate the AcuSolve input files, then launch the solver. AcuSolve will run on four processors to calculate the transient solution for this problem.
  4. Click Ok to start the solution process.

    While computing the solution, an AcuTail window opens. Solution progress is reported in this window. A summary of the solution process indicates that the run has been completed.

    The information provided in the summary is based on the number of processors used by AcuSolve. If you use a different number of processors than indicated in this tutorial, the summary for your run may be slightly different than the summary shown.



    Figure 48.
  5. Close the AcuTail window and save the database to create a backup of your settings.

Run MotionSolve

In the next steps you will start MotionSolve and provide settings for communication with AcuSolve.
  1. Run Start > All Programs > Altair HyperWorks <version> > MotionSolve to open the HyperWorks Solver Run Manager.
  2. Click beside the Input file(s) field, browse to the location where you saved Valve_model.xml, and open it.
  3. Click to open the Available Options dialog.
  4. Enable the -as_cosim option to indicate coupling between MotionSolve and AcuSolve.


    Figure 49.
  5. In the -as_cosim dialog that appears, click None.
  6. In the Available Options options dialog, click Apply Options and close the dialog.
  7. Click Run to start MotionSolve.
    As the solution progresses, a HyperWorks Solver View window will open. Solution progress is reported in this window. The AcuSolve AcuTail window will also update as the solution progresses.


    Figure 50.
As the solution progresses, you can monitor the progress with AcuProbe, as detailed in the next steps.

Monitor the Solution with AcuProbe

While AcuSolve is running, you can monitor flow characteristics such as inlet pressure, displacement of the valve, and velocity of the valve, using AcuProbe.

  1. Open AcuProbe by clicking on the toolbar.
  2. In the Data Tree, expand Surface Output > Inlet > Pressure.
  3. Right-click on pressure and select Plot.
    Note: You might need to click on the toolbar in order to properly display the plot.
  4. Collapse Inlet under the Surface Output item.
  5. Expand Valve wall > Geometry under the Surface Output item.
  6. Right-click on mesh_x_displacement and select Plot.


    Figure 51.

    Note that the valve motion lags behind the pressure changes at the inlet. Note also the spike around the 25th time step. This represents the collision of the valve stem with the stop and the subsequent rebound of the valve.

Post-Process the Velocity of Valve Walls with AcuProbe

AcuProbe has the ability to plot many other quantities. One such quantity is velocity of the moving valve. In the next steps you will create a plot of the x-velocity of the valve walls.
  1. Turn off the plot of pressure at the inlet.
    1. Right-click Inlet.
    2. Select Plot None.
  2. Expand Valve wall > Momentum.
  3. Right-click on x_velocity and select Plot.
  4. Click on the toolbar to refresh the plot.


    Figure 52.

    Note that the spike in mesh_x_displacement around the 25th time step corresponds with a sudden decrease in the velocity of the valve walls. This represents the collision of the valve stem with the stop and the subsequent rebound is reflected by a negative X velocity.

View Results with AcuFieldView

Now that a solution has been calculated, you are ready to view the flow field using AcuFieldView. AcuFieldView is a third-party post-processing tool that is tightly integrated toAcuSolve. AcuFieldView can be started directly from AcuConsole, or it can be started from the Start menu, or from a command line. In this tutorial you will start AcuFieldView from AcuConsole after the solution is calculated by AcuSolve.

In the following steps you will start AcuFieldView, display velocity magnitude and animate the view to show mesh displacement. You will then display velocity vectors and pressure contours when the valve shutter is at maximum displacement.

Start AcuFieldView

  1. Click on the AcuConsole toolbar to open the Launch AcuFieldView dialog.
  2. Click Ok to start AcuFieldView.
    When you start AcuFieldView from AcuConsole, the results from the last time step of the solution that were written to disk will be loaded for post-processing.

Display Velocity Magnitude on the Front Symmetry Plane

In the next steps you will create a boundary surface to display contours of velocity magnitude on the front symmetry plane of the modeled slice.

These steps are provided with the assumption that you are able to manipulate the view in AcuFieldView to have a white background, perspective turned off, outlines turned off, and the viewing direction set to +Z. If you are unfamiliar with basic AcuFieldView operations, refer to Manipulate the Model View in AcuFieldView .

  1. Click to open the Boundary Surface dialog.
    Note: The dialog may already be open. This step will put the focus on the dialog.


    Figure 53.
  2. Disable the Show Mesh option.
  3. Set velocity_magnitude as the scalar field to display.
    1. Click Select in the Scalar Function control group to open the Function Selection dialog.
    2. Select velocity_magnitude from the list.
      Note: You may need to scroll down in the list to find velocity_magnitude.
    3. Click Calculate.
  4. Set the front symmetry plane and pipe walls as the location for display of contours.
    1. Click SBC: Front symmetry.
    2. Hold the Ctrl key and click SBC: Pipe wall.
    3. Click OK.
  5. Add a legend to the view.
    1. Click the Legend tab in the Boundary Surface dialog.


      Figure 54.
    2. Enable the Show Legend option.
    3. Enable the Frame option.
    4. Click the white color swatch next to Geometric in the Color group and set the color for the legend values to black.
    5. Set Decimal Places to 1.
    6. Click the white color swatch next to the Title field and set the color for the title to black.


    Figure 55.

    This image was created with a white background, perspective turned off, outlines turned off, and the viewing direction set to +Z.

    When data was loaded from AcuSolve, AcuFieldView displays information from the final time step. In the following steps you will display velocity magnitude at the first time step and then animate the display to show the motion of the valve shutter and the velocity changes throughout the simulation.

Animate the Display of Velocity Magnitude

In the next steps you will create a transient sweep and save it as an animation that can be viewed independently of AcuFieldView. As a first step, you will change the colormap used by the legend.

  1. Set the colormap to use defined maximum and minimum values throughout the transient sweep.
    1. Click the Colormap tab.


      Figure 56.
    2. Enter 6.6 for the maximum.
    3. Enter 0 for the minimum.
    These settings will be used throughout the transient sweep so that the contours at each time step will all be relative to this specified range.
  2. Click the Tools menu and then click Transient Data to open the Transient Data Controls dialog.
  3. Click Tools > Flipbook Build Mode.
  4. Click OK to dismiss the Flipbook Size Warning dialog.
    The Sweep button on the Transient Data Controls dialog will have changed to Build.


    Figure 57.
  5. Use the slider control to set the Solution Time to the first time step and click Apply.
  6. Click Build.
    As AcuFieldView builds the flipbook animation, you will see the controls on the Transient Data Controls dialog advance. Once the flipbook is built, a Flipbook Controls dialog will allow you to play or save the animation.


    Figure 58.
  7. Click Frame Rate and set the Minimum Time Seconds to 0.1.
  8. Use the controls on the Flipbook Controls dialog to play and pause the animation.
  9. Save the animation as mesh_velocity_mag_coupled.
    AcuFieldView will add the appropriate file extension. For Windows, mesh_velocity_mag_coupled.avi will be saved. It can be viewed independently of AcuFieldView by double-clicking it in Windows Explorer.
  10. Close the Flipbook Controls dialog and click OK to dismiss the Flipbook Exit Confirmation warning.

Display Pressure Contours and Velocity Vectors on a Mid-Z Coordinate Surface

In the next steps you will create a coordinate surface at the mid-Z plane of the modeled section. You will then display pressure contours and velocity vectors on that surface.

  1. Disable the Visibility option on the Boundary Surface dialog used to create the display of velocity magnitude.
  2. Open View > Defined Views and set the view to +Z.
  3. Click to open the Coordinate Surface dialog.
  4. Create and configure a new coordinate surface at the mid-Z plane.
    1. Click Create.
    2. Change the Display Type to Smooth.
    3. Change the Coloring to Scalar.
    4. Select pressure as the Scalar Function to display.
    5. Set the Coord Plane to Z.
      This surface will be created in the XY plane at the middle of the geometry in the Z direction.
    6. Click the Colormap tab and enable Local in the Scalar Coloring group.
    7. Click the Legend tab and enable the Show Legend option.
    8. Click the black color swatch next to the Subtitle field and set the color for the subtitle to white.
  5. Create a second coordinate surface at the mid-Z plane for the display of velocity vectors.
    1. Click Create on the Surface tab of the Coordinate Surface dialog.


      Figure 59.
    2. Change the Display Type to Vectors.
    3. Click Options next to Vectors.


      Figure 60.
    4. Enable Head Scaling and set the scaling to 0.25.
    5. Set the Length Scale to 0.5.
    6. Enable Skip option and set it to 75 %.
    7. Close the Vector Options dialog.
    8. Change the Coloring to Geometric.
    9. Set the Geometric color to white.
    10. Set the Coord Plane to Z.
      This surface will be created in the XY plane at the middle of the geometry in the Z direction.
  6. Zoom in on the valve-body region of the model.
  7. Set transient data to display the 78th time step.
    1. Open Tools > Transient Data.
    2. Use the slider to set the Time Step to 78.


    Figure 61.

Summary

In this tutorial, you worked through a basic workflow to set up a transient simulation for moving mesh and variable inlet pressure. The solution of this case was coupled between AcuSolve for the flow field and MotionSolve for the rigid-body dynamics. Once the case was set up, you generated a mesh and generated a solution using AcuSolve and MotionSolve. AcuProbe was used to post-process the motion of the valve shutter (x_mesh_displacement) and velocity of the valve walls. Results were also post-processed in AcuFieldView to allow you to create contour and vector views, and to allow you to view the transient data. New features introduced in this tutorial include: coupled solution with an external code, fluid-structure interaction, mesh motion, transient simulation, multiplier functions, post-processing with AcuProbe, and animation of transient results.