|
[Sponsors] |
October 15, 2018, 11:50 |
How to match RET(NVAR) with Control Volumes
|
#1 |
New Member
Join Date: Sep 2018
Posts: 11
Rep Power: 8 |
Hello, everyone.
I'm trying to calculate a type of source term. So I try to use CFX user CEL to do this. Now I have gotten the Control Volumes by calling USER_GET_MESHDATA. It is stored in RZ(pVAR : (pVAR+NVAR-1) ). NVAR also equals to the number of vertices in the current LOCALE. But NLOC equals to ( Num. of Elements on current LOCALE )*8 and doesn't equal to NVAR. So, to match them, I have to know the order of RET(NLOC), i.e. which vertice RET(ILOC) is pointing to; and the order of the Control Volumes in RZ(pVAR : (pVAR+NVAR-1) ) The following is the output of my CEL: Code:
****USER_CALC_INFO*****Information******* WHO = DEF_SOU_MOMU ACTION = GET CVAR = SOURCE_A LOCALE = IELG1 ENTITY = VERTEX WHEN = TIME-0 CZONE = ZN1 CALIAS = SOURCE_A ILOCS = 1 ILOCF = 24 IENTS = 1 IENTF = 8 ****Global Mesh Information**** NZN = 1 NVX = 60 NEL = 24 NELS = 1 NIELG = 1 ****Element Group Information**** IELS = 1 IELG = 1 ISEL_S = 1 ISEL_F = 24 pVAR = 4683 NVAR = 60 NLOC = 192 |
|
October 17, 2018, 09:03 |
|
#2 |
Senior Member
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33 |
May I ask why you need the control volume volumes?
The software is clearly evaluating the source strength at the vertices of an element, which is independent of the control-volume volume or element volume. If you know the total source instead and you are trying to remove the volume dependency to match the software, you are better off using the Total Source option instead. I suggest reviewing your source term formulation. Feel free to describe the formulation, and perhaps we can help here. |
|
October 17, 2018, 22:27 |
|
#3 |
New Member
Join Date: Sep 2018
Posts: 11
Rep Power: 8 |
Hi, Opaque! Thank you for helping me again!
The source term I'm trying to add is to model the Vortex Generater(VG). The VG model is called BAY model, according to the artical < Modeling Vortex Generators in a NAVIER-Stokes Code > by Julianne C. Dudek. The formulation is 1.JPG. The definition of the vectors is 2.JPG In this formula, Vi is the Volume of cell, which is in my opinion Element Volume( for mesh center method ) or Control Volume volume( for mesh vertex method ). After I got the Element Volume, I found that CFX uses mesh vertex method instead of mesh center method. It discretize and computes the NS equation on the center of the Control Volumes, i.e. the Element Vertices. So I changed my CEL code from getting Element Volume to getting Control Volume volume. Hope I have described the promlem clearly. Thank you, Opaque! |
|
October 18, 2018, 14:34 |
|
#4 |
Senior Member
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33 |
May I ask, what is the summation range for Vi? Does it sum Vi contribution from a cloud of control volumes? I guess so.
If that is the case, how are you planning to compute the "Sum of Vi" when you only have a subset of elements to work with, and those may not span the summation range. Once we understand the pieces, we can figure out how to compute the source strength. Keep in mind that CFX have control volumes on the vertices of the mesh, BUT (big) it computes the contribution from elements; therefore, the total value of the source at a vertex is summed up from looping about the element sharing a given vertex. Hence, you must be extremely careful computing a strength that may depend on the total value before it is computed. Hope the above helps |
|
October 18, 2018, 21:38 |
|
#5 |
New Member
Join Date: Sep 2018
Posts: 11
Rep Power: 8 |
Thank you, Opaque! You have helped me a lot!
The summation range for Vi is the Total Volume of the Elements which are occupied by the VG. Maybe the VG is separated by 2 or 3 IELG, and this is a little hard to deal with. When CFX is computing the source at a vertex, how does it loop about the elements sharing the given vertex? Or how does it decide which elements are sharing the given vertex? Thank you again, Opaque! Don't know how to express my excited heart! |
|
October 19, 2018, 08:02 |
|
#6 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,871
Rep Power: 144 |
CFX knows the mesh structure through the mesh connectivity matrix. It cannot solve anything unless it know how the elements are connected together.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
October 21, 2018, 10:28 |
|
#7 |
New Member
Join Date: Sep 2018
Posts: 11
Rep Power: 8 |
Thank you, ghorrocks!
So how to get the mesh connectivity matrix and how to use it? |
|
October 21, 2018, 17:46 |
|
#8 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,871
Rep Power: 144 |
That is very complex and not suitable for a forum post. All I can recommend is to read the documentation and talk to ANSYS support for assistance.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
October 21, 2018, 21:13 |
|
#9 |
New Member
Join Date: Sep 2018
Posts: 11
Rep Power: 8 |
Thank you, ghorrocks!
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
View Polyhedral Control Volumes used in CFX | u2berggeist | ANSYS | 0 | May 21, 2018 11:39 |
[ANSYS Meshing] Match Control, is this weird or am I stupid? | Moufle | ANSYS Meshing & Geometry | 2 | November 18, 2015 17:00 |
[ANSYS Meshing] Match Control on multi-body part | tdbbz | ANSYS Meshing & Geometry | 2 | September 19, 2012 20:43 |
Match Control and Symmetry Boundary Condtions in a quasi 2D calculation | peterputer | ANSYS Meshing & Geometry | 0 | May 15, 2012 09:53 |
gmsh2ToFoam | sarajags_89 | OpenFOAM | 0 | November 24, 2009 23:50 |