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

UDF unit conversion

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 10, 2016, 01:49
Default UDF unit conversion
  #1
New Member
 
Join Date: Aug 2016
Posts: 8
Rep Power: 9
yeongjia is on a distinguished road
Hey guys, i have encountered a weird problem with my UDF code. So the code that i am using is based off someone else's work. It is a UDF code to implement Shyy and Jayaraman's plasma model onto any working model.

This is the defined variables from the original code:
Quote:
/*Define the input input parameters*/
#define PlasmaVoltage 2200/* Input Voltage RMS (V) */
#define Freq 8100 /* Plasma Voltage Frequency (Hz) */
#define ChargeDensity 1E08 /* Electron Charge Density (electrons/mm^3) */
#define Eb 3000 /* Break down electric field strength (V/mm) */
#define Delt 54.2E-06 /* Plasma discharge time (seconds) */
#define a 1.5 /* height demension of plasma (estimated) (mm) */
#define b 3 /* width dimension of plasma estimated ) (mm) */
#define d 0.25 /* horizontal distance between electrode plates (mm) */
#define alpha 0.6 /* Ionization collision efficiency coefficient */
#define FluidPermittivity 8.854187817E-9 /* Value for Fluid Permittivity in air (F/mm) */
I found out that the default unit settings in Fluent was in (m) so i changed it from (mm) to (m). The original code in (mm) was tested on my 2D model in Fluent and it seems to be working smoothly but for some odd reason, after carefully converting all the units into (m), the simulation does not run as smoothly as it would in the original file. Instead, when i hit calculate in Fluent, it says that the flow is reversed in XXX faces on pressure outlet.

This is the UDF code after the units have been converted from (mm) to (m):
Quote:
/*Define the input input parameters*/
#define PlasmaVoltage 2200 /* Input Voltage RMS (V) */
#define Freq 8100 /* Plasma Voltage Frequency (Hz) */
#define ChargeDensity 1E17 /* Electron Charge Density (electrons/m^3) */
#define Eb 3E6 /* Break down electric field strength (V/m) */
#define Delt 54.2E-6 /* Plasma discharge time (seconds) */
#define a 0.0015 /* height demension of plasma (estimated) (m) */
#define b 0.003 /* width dimension of plasma estimated ) (m) */
#define d 0.00025 /* horizontal distance between electrode plates (m) */
#define alpha 0.6 /* Ionization collision efficiency coefficient */
#define FluidPermittivity 8.854187817E-6 /* Value for Fluid Permittivity in air (F/m) */
I am just wondering why this happened, i have tried applying the UDF source terms on a different region of the model, as well as extending the length of the model but still got the same results from the simulation runs where the flow is reversed. I am still convinced that it was the conversion of units that may have caused the simulated flow to reverse. Please let me know if you have encountered this problem before!

Additional info;
Turbulent flow model: Standard k-omega
y+: 0.0000183

Thanks in advance!!

Regards,

J


EDITED: For some reason, I have decided to run 6 different simulations each time changing the values to see if it would make any difference. I have found out that the main variable causing the flow to reverse is the electron charge density.

Last edited by yeongjia; September 10, 2016 at 04:29.
yeongjia is offline   Reply With Quote

Old   September 12, 2016, 11:10
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
Did you consider the option that you did everything right, and that the flow simply is reversed in reality?
pakk is offline   Reply With Quote

Old   November 5, 2019, 05:21
Post UDF plasma model
  #3
New Member
 
iyad
Join Date: Nov 2019
Posts: 21
Rep Power: 6
pitch is on a distinguished road
[QUOTE=yeongjia;617349]Hey guys, i have encountered a weird problem with my UDF code. So the code that i am using is based off someone else's work. It is a UDF code to implement Shyy and Jayaraman's plasma model onto any working model.

This is the defined variables from the original code:


I found out that the default unit settings in Fluent was in (m) so i changed it from (mm) to (m). The original code in (mm) was tested on my 2D model in Fluent and it seems to be working smoothly but for some odd reason, after carefully converting all the units into (m), the simulation does not run as smoothly as it would in the original file. Instead, when i hit calculate in Fluent, it says that the flow is reversed in XXX faces on pressure outlet.

This is the UDF code after the units have been converted from (mm) to [B](
I am just wondering why this happened, i have tried applying the UDF source terms on a different region of the model, as well as extending the length of the model but still got the same results from the simulation runs where the flow is reversed. I am still convinced that it was the conversion of units that may have caused the simulated flow to reverse. Please let me know if you have encountered this problem before!

Additional info;
Turbulent flow model: Standard k-omega
y+: 0.0000183

Thanks in advance!!

Regards,

J


hi i want to apply same model of shyy on rotating airfoil i wrote the equations but my problem is how to define the triangular region (x,y) in E ; since its rotating, can you help me with that udf please
pitch is offline   Reply With Quote

Old   November 5, 2019, 05:22
Default
  #4
New Member
 
iyad
Join Date: Nov 2019
Posts: 21
Rep Power: 6
pitch is on a distinguished road
hi i want to apply the same model of shyy on rotating airfoil i wrote the equations but my problem is how to define the triangular region (x,y) in E ; since its rotating, can you help me with that udf please
pitch 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
CFD by anderson, chp 10.... supersonic flow over flat plate varunjain89 Main CFD Forum 18 May 11, 2018 07:31
Source Term UDF VS Porous Media Model pchoopanya Fluent UDF and Scheme Programming 1 August 28, 2013 06:12
I need UDF help. S.Whitney FLUENT 0 October 15, 2007 11:29
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 04:01
Some problems about UDF in fluent5.4 Mark FLUENT 2 August 14, 2001 08:03


All times are GMT -4. The time now is 06:00.