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

UDF for removing the density in the flux term of UDS

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 24, 2017, 19:10
Default UDF for removing the density in the flux term of UDS
  #1
New Member
 
Nadun Palmada
Join Date: Apr 2017
Posts: 15
Rep Power: 9
Nadun19 is on a distinguished road
Hi guys
I am trying to make a UDF that will remove the density term from the advective term in a user defined scalar. I have come up with the following code but it is giving me a segmentation error:
Code:
DEFINE_UDS_FLUX(overall_flux,f,t,i)
{
	real NV_VEC(velo), NV_VEC(A);
	NV_D(velo, =, F_U(f,t), F_V(f,t), F_W(f,t));
	F_AREA(A,f,t);
	return NV_DOT(velo,A);
}
I also tried this (what the ANSYS handbook has):

Code:
DEFINE_UDS_FLUX(overall_flux,f,t,i)
{
	real rho;
	rho = (C_R(F_C0(f,t),THREAD_T0(t)) + C_R(F_C1(f,t),THREAD_T1(t)))/2;
	return F_FLUX(f,t) / rho;
}
I have hooked the UDF correctly within the UDS box under flux function.

Thanks
Nadun19 is offline   Reply With Quote

Old   October 21, 2017, 13:30
Default UDS advection term
  #2
New Member
 
Papsy
Join Date: Feb 2017
Posts: 1
Rep Power: 0
PapDes is on a distinguished road
Hi

Please were you able to remove the density term from the advective term for the UDS equation? And if you were able to do so, can you please share with how you did that?

Thanks
PapDes is offline   Reply With Quote

Old   October 20, 2018, 16:58
Default
  #3
New Member
 
hossein
Join Date: Aug 2010
Posts: 3
Rep Power: 15
hosen is on a distinguished road
hi Nadun.
could you remove density from UDS flux?
if yes, please explain how you could eliminate rho from UDS flux.
thanks
hosen is offline   Reply With Quote

Old   February 13, 2019, 05:38
Default
  #4
New Member
 
Mojtaba
Join Date: Feb 2019
Posts: 1
Rep Power: 0
moji1990 is on a distinguished road
Hi,
The segmentation error is maybe due to the fact that the velocity components are not available on the interior faces. I think they are only available at the boundary faces. You need to approximate the velocity on the interior faces by the values of corresponding variable stored at the adjacent cells centers.
moji1990 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
Replacing production term in Spalart-Allmaras via UDF radix Fluent UDF and Scheme Programming 0 February 10, 2017 11:18
UDS of concentration solved in multiphases system Tleja Fluent UDF and Scheme Programming 0 January 19, 2017 11:38
UDS Flux Function Choice Yang Chung FLUENT 1 November 17, 2015 01:14
UDS flux and boundaries Kasper Skriver FLUENT 0 April 18, 2006 08:36
density update by UDF in non-premixed combustion IKSOO FLUENT 2 December 8, 2002 20:37


All times are GMT -4. The time now is 05:02.