|
[Sponsors] |
UDF for removing the density in the flux term of UDS |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 24, 2017, 20:10 |
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 |
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); } 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; } Thanks |
|
October 21, 2017, 14:30 |
UDS advection term
|
#2 |
New Member
Papsy
Join Date: Feb 2017
Posts: 1
Rep Power: 0 |
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 |
|
October 20, 2018, 17:58 |
|
#3 |
New Member
hossein
Join Date: Aug 2010
Posts: 3
Rep Power: 16 |
hi Nadun.
could you remove density from UDS flux? if yes, please explain how you could eliminate rho from UDS flux. thanks |
|
February 13, 2019, 06:38 |
|
#4 |
New Member
Mojtaba
Join Date: Feb 2019
Posts: 1
Rep Power: 0 |
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. |
|
|
|
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 12:18 |
UDS of concentration solved in multiphases system | Tleja | Fluent UDF and Scheme Programming | 0 | January 19, 2017 12:38 |
UDS Flux Function Choice | Yang Chung | FLUENT | 1 | November 17, 2015 02:14 |
UDS flux and boundaries | Kasper Skriver | FLUENT | 0 | April 18, 2006 09:36 |
density update by UDF in non-premixed combustion | IKSOO | FLUENT | 2 | December 8, 2002 21:37 |