CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

How to calculate the curvature in UDF

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 3 Post By vig

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 8, 2009, 22:04
Default How to calculate the curvature in UDF
  #1
New Member
 
Xinqiang Xu
Join Date: Mar 2009
Posts: 5
Rep Power: 17
Xinqiang is on a distinguished road
Hi,

I use VOF model to simulate the liquid-vapor two phase flow. I want to get the interface curvature by udf, but I don't know how to write the equation (showed as attachment) in udf. If you know how to deal with this, could you give me some suggestion? Thanks

Xinqiang
Attached Images
File Type: jpg 2.JPG (5.1 KB, 208 views)
Xinqiang is offline   Reply With Quote

Old   January 4, 2013, 04:48
Default
  #2
New Member
 
Join Date: Aug 2011
Posts: 3
Rep Power: 15
shiraz_man67 is on a distinguished road
I have same problem too I want to implement disjoining pressure and I need surface curvature of each cell
shiraz_man67 is offline   Reply With Quote

Old   January 24, 2013, 21:06
Default
  #3
vig
New Member
 
anonymous
Join Date: Jan 2011
Posts: 23
Rep Power: 15
vig is on a distinguished road
You could access the curvature by the following
- Use solve>set>expert option for keeping the temporary memory from being freed [yes]

- Then Use SV_C_TMP_0 in the udf to access the value of curvature.
( This would give you the value of secondary phase curvature)

- Not always safe as this is the temporary variable and you access the values being last stored in this variable. So check before using it.
weloveUDF, wond and jiangzili like this.
vig is offline   Reply With Quote

Old   February 10, 2013, 20:39
Default
  #4
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
Quote:
Originally Posted by vig View Post
You could access the curvature by the following
- Use solve>set>expert option for keeping the temporary memory from being freed [yes]

- Then Use SV_C_TMP_0 in the udf to access the value of curvature.
( This would give you the value of secondary phase curvature)

- Not always safe as this is the temporary variable and you access the values being last stored in this variable. So check before using it.
Hi,

I suppose that there might be another way,
Saving C_VOF(c,t) into C_UDSI and extracting gradient by C_UDSI_G
Goodluck
syavash is offline   Reply With Quote

Old   February 15, 2013, 06:17
Default
  #5
vig
New Member
 
anonymous
Join Date: Jan 2011
Posts: 23
Rep Power: 15
vig is on a distinguished road
Volume fraction is discontinuous, therefore you would require to smoothen the volume fraction field before the calculation of gradient and curvature.
vig is offline   Reply With Quote

Old   July 29, 2013, 15:32
Default
  #6
Member
 
Shashank
Join Date: Apr 2011
Posts: 74
Rep Power: 15
shashank312 is on a distinguished road
Is there a way to calculate curvature apart from using the SV_C_TMP_0 macro? I'm sure there must be a way to calculate divergence of the unit normal vector to the liquid-vapor interface.
shashank312 is offline   Reply With Quote

Old   January 22, 2016, 21:08
Default
  #7
Member
 
cfd^2
Join Date: Mar 2013
Posts: 31
Rep Power: 13
cfd^2 is on a distinguished road
What is the real meaning of the macro SV_C_TMP_0? Does it directly access the interface curvature? I did not find details about this macro...
cfd^2 is offline   Reply With Quote

Old   February 11, 2019, 07:28
Smile Documentation for SV_C_TEMP_0
  #8
New Member
 
cfdnemo
Join Date: Jan 2019
Posts: 1
Rep Power: 0
cfdnemo is on a distinguished road
Quote:
Originally Posted by vig View Post
You could access the curvature by the following
- Use solve>set>expert option for keeping the temporary memory from being freed [yes]

- Then Use SV_C_TMP_0 in the udf to access the value of curvature.
( This would give you the value of secondary phase curvature)

- Not always safe as this is the temporary variable and you access the values being last stored in this variable. So check before using it.
Is there any documentation for these macros? I couldn't find any fluent manual such as those for cell and face macros.
cfdnemo is offline   Reply With Quote

Old   December 16, 2022, 02:54
Default curvature
  #9
New Member
 
sunfuqi
Join Date: Dec 2022
Posts: 2
Rep Power: 0
dingdangmao is on a distinguished road
Quote:
Originally Posted by vig View Post
You could access the curvature by the following
- Use solve>set>expert option for keeping the temporary memory from being freed [yes]

- Then Use SV_C_TMP_0 in the udf to access the value of curvature.
( This would give you the value of secondary phase curvature)

- Not always safe as this is the temporary variable and you access the values being last stored in this variable. So check before using it.
i have no idea about SV_C_TMP_0,can you support some realted document about how to use ?
dingdangmao is offline   Reply With Quote

Old   December 16, 2022, 03:28
Default
  #10
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
probably you may use C_TMP_C0(c,t) macro to access to SV_C_TMP_0

however, I have no idea what's inside
from source
Code:
 /* SV_C_TMP_0 temporary storage, used extensively now for setting c_tmp value
     based on area average of face value. */
  SV_C_TMP_0,
  SV_C_TMP_1,                 /* temporary storage for sum of fluxes */
  SV_C_TMP_2,
  SV_C_TMP_3,                 /* temporary storage used for residual scaling */
  SV_C_TMP_V_0,               /* cell tmp vector storage for smoothed vof grad*/
  SV_F_TMP_0,                 /* temporary real on faces */
  SV_F_TMP_1,                 /* temporary real on faces */
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Reply


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
how to calculate the area of a boundary in UDF? peter FLUENT 2 May 31, 2021 21:54
UDF in z curvature leo FLUENT 0 October 17, 2008 12:06
I need UDF help. S.Whitney FLUENT 0 October 15, 2007 12:29
how to calculate electrical potential with UDF? josh FLUENT 4 January 24, 2006 12:34
How to calculate the mass flow rate with UDF ? HP FLUENT 0 January 10, 2005 20:38


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