CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

How to match RET(NVAR) with Control Volumes

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 15, 2018, 11:50
Talking How to match RET(NVAR) with Control Volumes
  #1
New Member
 
Join Date: Sep 2018
Posts: 11
Rep Power: 8
ertianlang is on a distinguished road
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
Could anyone help me, please! THANK YOU!
ertianlang is offline   Reply With Quote

Old   October 17, 2018, 09:03
Default
  #2
Senior Member
 
Join Date: Jun 2009
Posts: 1,876
Rep Power: 33
Opaque will become famous soon enough
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.
Opaque is offline   Reply With Quote

Old   October 17, 2018, 22:27
Talking
  #3
New Member
 
Join Date: Sep 2018
Posts: 11
Rep Power: 8
ertianlang is on a distinguished road
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!
ertianlang is offline   Reply With Quote

Old   October 18, 2018, 14:34
Default
  #4
Senior Member
 
Join Date: Jun 2009
Posts: 1,876
Rep Power: 33
Opaque will become famous soon enough
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
Opaque is offline   Reply With Quote

Old   October 18, 2018, 21:38
Default
  #5
New Member
 
Join Date: Sep 2018
Posts: 11
Rep Power: 8
ertianlang is on a distinguished road
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!
ertianlang is offline   Reply With Quote

Old   October 19, 2018, 08:02
Default
  #6
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,864
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
ghorrocks is offline   Reply With Quote

Old   October 21, 2018, 10:28
Default
  #7
New Member
 
Join Date: Sep 2018
Posts: 11
Rep Power: 8
ertianlang is on a distinguished road
Thank you, ghorrocks!
So how to get the mesh connectivity matrix and how to use it?
ertianlang is offline   Reply With Quote

Old   October 21, 2018, 17:46
Default
  #8
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,864
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
ghorrocks is offline   Reply With Quote

Old   October 21, 2018, 21:13
Default
  #9
New Member
 
Join Date: Sep 2018
Posts: 11
Rep Power: 8
ertianlang is on a distinguished road
Thank you, ghorrocks!
ertianlang is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 11:16.