Boundary Condition Setup of Zero Thickness Baffles in ANSYS CFD

Last week we discussed the different ways to create and mesh infinitely thin baffles using the tools in ANSYS Workbench.  In this blog, we’ll discuss how to create and modify baffles using the two flagship ANSYS CFD programs: CFX and Fluent.

CFX:

In CFX, the method you use to specify your baffles depends on your modeling intent, but the way the baffles were meshed will affect some of our choices. The two methods are as a ‘baffle boundary condition’ or defining a ‘baffle interface’.

Baffle Boundary Condition

Baffle walls can be created by inserting a boundary condition into the surrounding domain and selecting the appropriate faces.

bc1

Baffles created this way are for directing flow only!  Boundaries in CFX are always treated as leading to the exterior of the solved domain, which mean information cannot be passed from one side to the other (e.g. no heat transfer across the faces).

Baffle Interface

Alternatively, you can connect one side of a baffle face to the one facing the opposite direction by creating an Interface.

Face selection will depend on whether you made a conformal baffle (Default Method, Option 1, or Option 2 in Part 1 of this blog) or a nonconformal baffle (Option 3).  For nonconformal baffles, you can create Named Selections for each side of the baffle and then pick those from a list.  For conformal baffles, technically only 1 face exists for both sides in the Mesher, so the Named Selection can’t be used to specify side dependent locations.  That being said, conformal baffles will create 2 identical face IDs with different body IDs representing each side, and if you pick them for Side 1, CFX will automatically populate Side 2 with the appropriate pair.

bc2bc3

The interface will then need to be set as a wall, and additional interface models can be specified for the different equations.  For example, for Heat Transfer you can specify that the baffle provides a thermal resistance of a certain thickness of some defined material.

 

bc4

Heat transfer in this case is purely through-thickness.  In other words, heat can flow through the thickness of a metal baffle, but a high temperature would not conduct along the length of the baffle; instead the heat would spread through the adjacent fluid (and then interact with the wall at that the next location).

Fluent:

In Fluent, the method you use to specify your baffles is controlled by how the baffles were meshed, but modelling intent will still affect some choices therein. These methods we will separate between Conformal and Non-Conformal.

Conformal Baffles

Baffles formed by conformal meshes within a Part (Default Method, described last week in this blog) will come into Fluent as a coupled wall, consisting of a boundary zone and its shadow.  These zones represent the two opposite-facing sides of the baffle.

bc5

For the equations other than momentum, each side of the coupled wall can be treated individually or jointly.  For example, the default thermal behavior is to couple each side of the wall together using either a direct mapping of temperature (0 Wall Thickness) or using a specified thermal resistance (nonzero Wall Thickness), but you could instead set one side to have 0 Heat Flux and the other side to be a specific temperature.

bc6

Much like CFX, entering a Wall Thickness will provide a thermal resistance in the through-thickness direction.  However, Fluent additionally has a model called Shell Conduction that allows for heat transfer along the baffle in addition to through it.

Non-Conformal Baffles

Baffles defined by non-conformally meshed faces (i.e. Option 3 in last week’s blog) require different actions depending on whether you are using them to direct flow only or to additionally pass information.

Non-conformal baffles are exterior faces in the mesher, so if you only need them to direct the flow, they will automatically do so without any user intervention (note that if you also have a non-conformal mesh across regions where there are no baffles, you will need to have an interface across those faces).

If you do need to pass information across the baffle (like heat flow), you must create a non-conformal interface using the coupled-wall option.

bc7

This will create 4 addition zones: the Boundary Zones (Side 1 & 2) which are used to control the wall information for areas where the two sides do not line up, and the coupled wall Interface Wall Zones (Side 1 & Side 2) which are used to specify the wall behavior when there is overlap between the two sides.  From here, the coupled wall Interface Wall Zones can be set as described in the Conformal Baffles section, other than that Shell Conduction is not supported (through-thickness heat transfer is still allowed).

One important thing to remember here is that Fluent non-conformal interfaces regularly experience trouble with significant overpenetration between the two sides of the interface.  This typically occurs when there are different mesh sizes on either side of a curved interface.  To combat this, you can enable the Mapped Interface Option, which will use an alternative heat transfer calculation across the coupled wall that performs much better with excessive mesh penetration.

bc8

Advertisements

Meshing Tips for Zero Thickness Baffles in CFD

nobaffleA common technique in distributing ducted flow involves thin guiding vanes, or baffles.  One of the biggest hurdles to modeling baffles is how thin they are relative to the rest of the model.  If you were to model their true thickness, you typically have a choice between poor quality, skewed elements and an excessively high mesh count.  Instead, thin baffles are often approximated as infinitely thin.  There are several ways to create these zero thickness baffles, and the method you choose will affect your meshing strategy as well as your boundary condition setup.  Today we will focus on meshing challenges, and next week in Part 2 we will cover setup in CFX and Fluent.

Default Baffle Meshing; Non-Manifold Faces

The traditional method for creating baffles involves grouping surface bodies and solid bodies into a Part in DesignModeler (or into a Component using the Merge Topology option in SpaceClaim).  This results in a single solid body in the Mesher with internal faces where the surface bodies intersected it.

baffle1

baffle2

These internal faces (with the same body on both sides of the face) are referred to as Non-Manifold Faces, and had to be created using the method above because most geometry editors don’t actually allow non-manifold faces.  In the Mesher, non-manifold faces limit the types of mesh methods that you can use: except in rare cases, you must use tetrahedral elements (which will typically drive up your mesh count and negatively affect the convergence rate)

baffle3

.Inflation on these non-manifold faces is also problematic.  For a finite thickness wall, inflation would simply wrap around the thin face from one side to the other; but for an infinitely thin baffle there’s no way for it to wrap around without producing a degenerate (i.e. collapsed) element.  Instead, the Mesher will stair-step the inflation down to nonexistence by the time it reaches the end of the baffle.

baffle4

Not only does this create poor quality pyramid elements where the stair step occurs, it tends to result in high y+ and bad element transition ratios, which can be just as problematic.  It is generally recommended to fix this behavior using one of the options below.

Option 1: Adjacent Nonconformal Interfaces

The problems listed above stem from the fact that the baffles are composed of non-manifold faces.  The fix is then to convert them exterior faces instead!

Rather than having surface bodies that end in the middle of a solid body, we could slice the model in such a way to make each passage between the baffles its own body, and then combine these bodies into a Part.  We can then give a Named Selection to these faces to be treated as walls.baffle5

The bodies adjacent to these passages will need to be nonconformally meshed though (i.e. be a separate Part so they do not share nodes).  If you were to leave everything as a single Part (or Merged Topology Component), The inflation layers would branch out and produce many of the same problems we saw with the tetrahedral inflation layers.

Option 2: Extending Baffle Faces

A drawback of Option 1 is that it typically results in a lack of mesh refinement immediately downstream of the baffles, which is an area where you often need more resolution.

Instead of placing nonconformal interfaces directly adjacent to the baffles, you could offset these and extend the baffle faces up to these offsets (alternatively you could not use any nonconformal interfaces and just extend the baffles to the ends of the model).  The trick would be to only select some of the faces between these bodies to be baffles.  Any face between bodies but within a multibody part that is not explicitly given a Named Selection will be treated as interior and not block the flow.

baffle6

Option 3: Nonconformal Interfaces as Baffles

The above options use multibody parts to define the baffle locations; if you are using a swept mesh this forces all the passages to use the same number of divisions in the sweep direction.  If each passage were drastically different in size, you might want to use different mesh controls for each passage, while still maintaining hexahedral elements and baffles in between.  This can be done with a noncoformal mesh between the passages.

Like before, each passage between the baffles is split up into its own body, but also remains as its own Part.  Then, we only need to specify where the interfaces go.  Faces where the baffle doesn’t exist will need to be set as interfaces, but baffle locations will only require interfaces if we need to pass data across them (like heat flow, species diffusion through a membrane, etc.).

baffle7

In our next blog, we’ll discuss how to handle the setup of infinitely thin baffles in CFX and Fluent.

 

Convergence Monitoring in ANSYS Fluent

When solving CFD models using ANSYS products, there are a number of ways to determine model convergence.  DRD recommends monitoring a combination of holistic (like individual equation residual values, which are representative of the average error across all control volumes in the model) and local quantities (like surface and point monitors) to ensure a stable, converged solution.

Sometimes you might encounter a situation where one or more residual does not reach its convergence target, but important characteristic features being monitored have steadied to a particular value.  Often this is sufficient for approximating the behavior you are simulating, but other times you may need to strive for more precision.  To do so, it is helpful to be able to determine where in the model there are locally high residuals that are preventing the overall residual value from reaching its target.

residual1

By default, Fluent only exposes mass-imbalance (related to continuity residual) to the user.  When post-processing, this can be found in the Residuals group of variables.

residual2

To access the other residuals, you need to enable a certain expert parameter prior to solving.  Expert parameters can be accessed using the TUI command ‘/solve/set/expert’.  Beyond that, the prompts you receive will depend on your Fluent environment, so we can’t dictate a specific list of responses.  However, to enable the remaining residuals you will need to answer yes to the prompt “Save cell residuals for post-processing?”.

residual3

After solving you should then see more options for plotting residuals, which will allow you to better evaluate where local error is preventing the overall residual from reaching its convergence target.

CFD Postprocessing of Cross-Sectional Average Values – Part 2

Last week I covered a technique for postprocessing averaged cross-sectional values in ANSYS Fluent.  Today, in Part 2 of this blog, I want to cover two additional methods for doing this that is specific to ANSYS CFD-Post.

The first method involves Turbo Mode. It has advantages of better user control over the location and can use either area-weighted or mas-flow-weighted averages as appropriate. The disadvantage is that it is possible the location specification may be non-intuitive and can be complicated for complex geometries.

CFD-Post has a chart tool called Inlet to Outlet that allows you to plot cross-sectional averaged data along the streamwise direction from inlet to outlet of a selected region.  What’s the catch?  Unless you’re modelling Turbomachinery, you have to manually define the region to be used for calculation in terms of a turbo region: hub, shroud, inlet, and outlet.

For a straight pipe, this actually isn’t that hard: the hub can be defined by the axis of the pipe (0 radius, i.e. nonexistent), the shroud simply follows along the outer wall of the pipe, and the inlet and outlet simply connect these two lines.

pipe1

For more complicated profiles, you could alternatively create a Polyline that is defined by the intersection of a plane and the boundary whose profile you are wanting to capture.

From there you will need to define the global rotation axis in Turbo Mode (i.e. the axis of the pipe), specify the lines to define your Turbo region, and Initialize.  This will create a 2D grid defining the revolved region for the calculations.

chart1

After that, you can create the Inlet to Outlet chart as needed.

chart2.png

The second method for doing this postprocessing involves scripting a session file. The advantage here is that you have direct control over location and calculation method and can be generalized to pipes with bends. The disadvantage is that the scripting uses CCL and Power Syntax (i.e. Perl) so you need to be a little familiar with that and you must be running CFD-Post independent of Workbench.

The goal has been to plot cross-sectional averaged data versus length along a pipe, and the brute force method to do that is to average data on a plane normal to the centerline of the pipe and then repeat this at several points along the pipe.  One of the more powerful features in CFD-Post is the ability to record an operation done in CFD-Post and then script the recorded behavior to perform repeated actions.

pic1

Let’s say we’ve already created a plane, Plane 1, and written an Expression, PlanerAve, that will calculate the mass-flow-weighted average of our fuel on Plane 1.  We could then begin a new session file (from the Session menu), start recording, edit Plane 1 to a new location, and then stop the recording.  If we then open this CSE (session) file, we can add some perl commands surround the CCL that directs the plane to loop through a set of locations and store the evaluated expression into an array.  Then, we can have that array printed to a CSV (comma separated value) file for plotting in a third party spreadsheet too like Microsoft Excel.

script

In CFD-Post, we can read this modified Session file back in using the Session menu.

excel1

An example of this script can be obtained by e-mailing support@drd.com.

CFD Postprocessing of Cross-Sectional Average Values – Part 1

pipecontour

In ANSYS CFD, it’s fairly simple to visualize how local cross-sectional profiles vary with respect to pipe length by animating a plane to sweep down the pipe.  However, a question often comes up: what if I want to retrieve quantitative data from this, like a plot of a variable averaged across the cross-section versus pipe length?  It turns out you can do this too, just not using the animation tool.  There are several different methods available to do this with ANSYS and you may choose your method based on your solver – Fluent or CFX.

Today’s post will be specific to Fluent.  In Part 2 of this blog post next week, I will cover how to do this in in the general CFD-Post processor that will be applicable to Fluent, CFX, Icepak or any other program that uses CFD-Post.

The advantage to this method specific to Fluent is that it is a very fast setup. A disadvantage is that there is little user control over location and you must use an area-weighted average which could give misleading data for transported quantities.

When solving using ANSYS Fluent, there is actually a TUI command available to you that will calculate a circumferential average of a selected variable on a selected zone along an axis: /plot/circum-avg-axial.  The command will ask for the variable to average, the surface to calculate on (remember: cell zones have an associated interior boundary zone that represents its internal volume), how many data points to calculate along the axis, and the file to write the data to.  The axis it uses will be defined in the Reference Frame tab of the cell zone associated with the surface you pick.  After it writes a file, you can then read this data into an XY Plot and display it.  One important thing to keep in mind is that the data in the file are just numbers: the axis labels on the screen are controlled by the Solution XY Plot window and are independent of the data in the file.

tui

screen

Slip Slidin’ Away! Modifying Friction Coefficients During a Mechanical Simulation

There are situations in which it may be necessary to tweak friction coefficient in a nonlinear contact analysis during the simulation. Currently, the ANSYS Workbench GUI does not support this capability directly; however, it is possible to vary the friction coefficient using a command object.

The ANSYS documentation has several references of doing this as listed under the Help section; Mechanical APDL > Material Reference > Nonlinear Material Properties > Contact Friction as shown below.

image1

This section on the documentation describes defining contact friction using TB,FRIC which is a material property used with current technology contact elements. It can be used to define coefficient of friction for both isotropic or orthotropic friction models. It further discusses varying friction coefficient in a multiple load step scenario, as well as implementing user defined friction  using TB,FRIC with TBOPT = USER.

The example presented here will show how to use commands object within Workbench to vary friction coefficient. The friction coefficient is defined via the TB,FRIC command. To define the friction that is function of temperature, time, normal pressure, sliding distance, etc. you can use the TBFIELD command in conjunction with the TB,FRIC. In this example presented, the friction is varied with time (to simulate it’s change through the load step).

Below is a graphic of the nonlinear contact between the Aluminum housing and steel ring gear.
image2

The command object used to modify friction as a function of time is shown below.
image3

This command object uses the information in the table below to modify friction :

Time                Friction Coefficient
0                      0
0.2                  0.1
0.4                  0.3
0.6                  0
0.8                  0.15
1                      0

As an example of the friction can vary, notice the friction coefficient is zero for time = 0.6 and time = 1.0.

During the run, the output controls under Analysis Settings was set to Yes for Nodal Forces, Contact Miscellaneous and General Miscellaneous.

A quick look at the contact results confirms our findings. The contour plot for contact friction stress shows zero results for time = 0.6 and 1 which makes sense, since the friction coefficient is essentially zero at these time points.
image5

Another sanity check is to check for reaction force through the frictional contact with the extraction method set to contact element option; this also reveals zero (nearly zero reaction force at these time points). The very small discrepancy noted on the reaction force is due to a few overlapping nodes on a boundary condition.
image4.png

 

Restarts in ANSYS Mechanical Can Save Time and Effort!

‘Restarting’ the process in ANSYS Mechanical Products by which a model is solved starting from a previously solved point. The previously solved point contains data for all nodes/elements in the model; there is no results mapping and interpolation when a restart is performed. This is the most accurate method for starting an analysis from a previously solved point.

By default, restarts are not kept when a simulation finishes. The user must modify the Analysis Settings in ANSYS Mechanical to keep the restarts points that will be needed. Those options are shown below:

restart1

Restarts do have limitations. For instance, modification of loads in a step before a restart point is to be used invalidates that restart point. Several tables in the ANSYS Help documentation characterize what happens to restart points if objects in the model tree are changed. This section can be found in Mechanical Applications > Understanding Solving > Solution Restarts, as shown.

restart2

Here’s one of the tables showing where restarts can be used followed by common questions we related to restarts.

restart3

What can solution restarts be used for?
For cases where some subset of the loads does not change and only a few loads change/vary. This is commonly referred to as load case modeling. ANSYS Mechanical FEA can do load case modeling.

Can you give an example of load case modeling?
A model that solves bolt pretension in the first several steps and then locks them in place. Commonly, service loads are applied after the bolt tightening is simulated. The service loads can represent multiple load cases, say one load case is a pressure load, another is a force load.

Another example is a ROPS (Roll Over Protection System) analysis, where loads are sequentially applied on a structure until some criteria is met (usually energy dissipated by the structure). Once the criteria are met for one load case, the load is removed and another load is applied. This process can also be done via restarts.

Why would we do this?
This saves time on solving models. Using the example above, without restarts, the bolt pretension steps would need to be solved every time a load case is added/modified. With restarts, loads can just be activated/deactivated in a step following the bolt pretension and the bolt pretension final step used as the restart point.

Things to know before attempting this method:
All of the load cases that will be solved should be known beforehand. The restart analyses require that ALL loads are defined in the initial model. In ANSYS Mechanical, loads cannot be added to the model tree without invalidating the previous results (ignoring the ability to use restarts).

Newly added loads also will not be applied in a restart analysis as the restart method does not create new elements for these new loads.

If bolt pretension is to be used, any loads defined for a load case should be applied in a step after the final bolt pretension, as usual.

Also, if bolt pretension is used, a step after the final pretension occurs IS REQUIRED. If this is not included, ANSYS assumes the last bolt pretension will be Loaded and not Locked. This means that ANSYS would modify the pretension to maintain whatever preload you have assigned, rather than applying the service loads as a working load on the bolt. Physically, it would be like tightening/loosening the bolt as the service loads are applied.

Method:
The general steps to this method are as follows:

  1. Set up a model with all of the loads applied to the structure. This includes bolt pretensions and any loads that need to be simulated for the load cases. Set up the Analysis Settings as required for the analysis (multiple load steps, Large Deflections, etc.).
  2. Modify the Restart Controls to keep all restart points once the model is solved.
  3. Modify the loads for the load case studies to be inactive.
  4. Solve the model.
  5. Duplicate the analysis, sharing the Engineering Data, Geometry and Model cells. This guarantees the model setup remains the same for all models.
  6. In the new system, activate the load for the first load case study.
  7. Use the Tools > Read Results File… and locate the file.rst from the previously run analysis. This imports the results data into the model.
  8. Modify the Restart Analysis options in Analysis Settings to restart from the end of the first simulation (the final bolt pretension loading, for example).
  9. Solve the model.

Example:
The example shown here uses an oil field fluid end model with bolt pretensions applied. There are two load cases: 1) a pressure load on the cylinder bore, 2) a force load applied on one side of the fluid end body.