-
-
July 9, 2024 at 8:32 am洋 于Subscriber
I am doing research on foaming simulation. The udfs of the water component conversion rate Xw and hydroxyl component conversion rate Xoh source terms are as follows. Why does the rate of change become very small as the calculation proceeds and can almost be ignored? Yes, please give me some advice
DEFINE_SOURCE(uds_source_W, cell, sec_th, dS, eqn){real P = C_P(cell, sec_th)+101325;real T = C_T(cell, sec_th);real Xw = C_UDSI(cell, sec_th, 0);real Xoh = C_UDSI(cell, sec_th, 1);real P_bar = P / 100000.0;Âreal source_W;Thread*mix_th;Thread*pri_th;mix_th = THREAD_SUPER_THREAD(sec_th);pri_th = THREAD_SUB_THREAD(mix_th, 0);sec_th = THREAD_SUB_THREAD(mix_th,1);source_W =K_X*C_R(cell, sec_th) * C_VOF(cell, sec_th) * Aw * exp(-Ew / (R * T )) * (1 - Xw);dS[eqn] =K_X*C_R(cell, sec_th) * C_VOF(cell, sec_th) * Aw * exp(-Ew / (R * T ));return source_W;}ÂDEFINE_SOURCE(uds_source_OH, cell, sec_th, dS, eqn){real P = C_P(cell,sec_th)+101325;real T = C_T(cell, sec_th);real Xw = C_UDSI(cell, sec_th, 0);real Xoh = C_UDSI(cell, sec_th, 1);real P_bar = P / 100000.0;real source_OH;Thread*mix_th;Thread* pri_th;  mix_th = THREAD_SUPER_THREAD(sec_th);pri_th = THREAD_SUB_THREAD(mix_th, 0);sec_th = THREAD_SUB_THREAD(mix_th,1);source_OH = K_X * C_R(cell, sec_th) * C_VOF(cell, sec_th) * Aoh * exp(-Eoh / (R * T )) * coh0 * (1 - Xoh) * (cnco0 / coh0 - 2 * (cw0 / coh0) * Xw - Xoh);dS[eqn] = K_X * C_R(cell, sec_th) * C_VOF(cell, sec_th) * Aoh * exp(-Eoh / (R * T )) * coh0 * ((-2 * cw0 / coh0) * (1 - Xw) * cnco0 / coh0 - 2 * Xw * cw0 / coh0 - Xoh);return source_OH;}ÂDEFINE_SOURCE(uds_source_Qe, cell, thread, dS, eqn){real P = C_P(cell, thread)+101325 ;real T = C_T(cell, thread);real Xw = C_UDSI(cell, thread, 0);real Xoh = C_UDSI(cell, thread, 1);real P_bar = P / 100000.0;real Hoh = 7.705e4;real Hw = 8.6e4;real dXoh_dt = Aoh * exp(-Eoh / (R * T)) * coh0 * (1 - Xoh) * (cnco0 / coh0 - 2 * (cw0 / coh0) * Xw - Xoh) ;real dXw_dt = Aw * exp(-Ew / (R * T )) * (1 - Xw) ;real source_Qe;Thread* pri_th;Thread* sec_th;pri_th = THREAD_SUB_THREAD(thread, 0);sec_th = THREAD_SUB_THREAD(thread,1);source_Qe = K_X * C_R(cell, sec_th) * C_VOF(cell, sec_th) * (Hoh * coh0 * dXoh_dt + Hw * cw0 * dXw_dt) / Rpu;dS[eqn] = 0;return source_Qe;}Â
-
July 9, 2024 at 10:46 amRobForum Moderator
Check all the variables are defined. Then look at the values you're using and see what's going on in the model. Note, from the source names are these the values of the source, or a UDS?
-
Viewing 1 reply thread
- The topic ‘Source item udf’ is closed to new replies.
Ansys Innovation Space
Trending discussions
- Non-Intersected faces found for matching interface periodic-walls
- Script error Code: 800a000d
- Unburnt Hydrocarbons contour in ANSYS FORTE for sector mesh
- Help: About the expression of turbulent viscosity in Realizable k-e model
- Fluent fails with Intel MPI protocol on 2 nodes
- Cyclone (Stairmand) simulation using RSM
- error udf
- Diesel with Ammonia/Hydrogen blend combustion
- Mass Conservation Issue in Methane Pyrolysis Shock Tube Simulation
- Script Error
Top Contributors
-
1301
-
591
-
544
-
524
-
366
Top Rated Tags
© 2025 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.