If you have had the chance to work with CFX, most likely you have been working only with three-dimensional models. You usually receive a CAD model or create your own geometry and then use one of the many meshing tools available in ANSYS to mesh your 3D geometry. However, what if you are tasked to solve a simple two-dimensional model? Without thinking twice about it you create a 2D planar or axisymmetric geometry and generate a mesh. Unfortunately, when you try to read this simple 2D mesh into CFX you get an error while trying to load it. Unlike FLUENT, CFX does not have a separate 2D and 3D solver and doesn’t read in simple 2D meshes. This may first appear as a big problem but the work-around is rather simple. This article will give you the information needed to solve “2D” problems in CFX.
Since CFX is naturally a 3D solver, using a planar or axisymmetric 2D mesh is not possible. Instead, you will need to create a thin 3D volume or a thin 3D wedge, respectively. You can call these thin geometries “quasi-2D.” For example, consider the 2D planar geometry shown in Fig. 1 that represents a channel with flow entering through the boundary on the left and exiting on the right boundary. The upper and lower boundaries are no-slip walls. To solve this type of problem in CFX, you need to give the planar geometry some thickness in the 3rd dimension.
Figure 1: Simple 2D planar geometry representing a channel.
The first question is how thick or thin should you make the volume. You need to consider the quality of the cells so creating a thin volume usually works well. For a 2D planar geometry, a thickness of approximately 1/100th the length of the largest dimension in the model generally provides a nice mesh with good quality cells. Depending on possible smaller features in the geometry, this rule-of-thumb value can be adjusted. Thus, when you create your geometry, you can build a volume with the proper thickness or simply extrude an existing 2D planar model.
Figure 2 shows the channel geometry from Fig. 1 extruded in the 3rd dimension using the rule-of-thumb value from above. Note that if you create an extremely thin volume it may be difficult to select and to see the thin side areas for naming the boundaries. A very thin model is also not necessary and may affect the quality of the cells. The CFX solver is very robust so the thickness can vary quite a bit without any problems; however, it is best to stay consistent and using the suggestions outlined in this article are recommended.
Figure 2: Quasi-2D thin volume representing a channel.
Since the model is a 2D representation, you can just use a single cell thickness in the 3rd dimension. You can mesh the 2D face the same way you would mesh a regular 2D planar model. Once meshed and loaded into CFX, you can easily apply your inlet boundary, outlet boundary and upper and lower wall boundaries. The question now is what to do with the faces in the 3rd dimension. In the example above and with any geometry that represents a 2D planar model you will need to use symmetry boundaries.
Creating a “quasi-2D” model for a simple 2D planar geometry is easy enough. What about creating a model for a 2D axisymmetric geometry? In this case, we need to extrude a wedge. Again, the question is how many degrees should the wedge be extruded.
Figure 3: Quasi-2D thin wedge representing an axisymmetric pipe.
For a 2D axisymmetric geometry, a wedge having a thickness of about 5 degrees works just fine. An example of a 5 degree extrusion for an axisymmetric geometry representing a pipe is shown in Fig. 3. Once again, you only need a single cell in the 3rd dimension. There is no need for any special meshing near the axis. You can mesh the planar face just as you would a normal 2D geometry and take into consideration the need to resolve gradients and other important features in the flow. After loading the mesh into CFX, you apply your inlet boundary, outlet boundary and the outer wall boundary. There is no need to apply any boundary at the axis. There are now two options for the boundary condition on the faces of the 3rd dimension. If there is no flow in the 3rd direction, then you apply a symmetry boundary just as is done in the 2D planar case. If you are trying to model an axisymmetric problem with swirl, then you will need to apply a periodic boundary condition on the faces. Remember to use a periodic boundary only if you have swirling flow.
This article shows that solving a “2D” model in CFX is relatively straightforward. Except for the step of having to create a thin volume or wedge and applying the extra boundary conditions (symmetry or periodic) as specified in the article, setting up these types of models is the same as any other 2D solver and the results are basically identical. A helpful hint that may prove useful is as follows. The CFX solver requires that symmetry boundaries be planar to within a certain tolerance and sometimes a symmetry boundary mesh fails to meet this tolerance. This will require that you go back and remesh the model and ensure that the symmetry planes are essentially flat. However, if the solver continues to complain, you can change the offending symmetry boundary to a wall with a slip condition. The resulting solution will be the same as using a symmetry boundary.
Questions, comments and suggestions for future thermal/CFD FOCUS articles can be sent to J. Luis Rosales at the following email address: firstname.lastname@example.org.