-
-
July 28, 2022 at 4:41 pm
zdfrankman
SubscriberI am writing a UDF to have a source term only on the nodes that make up the walls. I was using this previously:
/******************************************************************
UDF that adds species source term to duct flow
*******************************************************************/#include "udf.h"
#define CON .01
DEFINE_SOURCE(cell_x_source, cell, thread, dS, eqn)
{
 real source;/******************************************************************
This loop checks if the cell has a near-zero velocity. If it does, it sets the source rate to the species concentration, mimicking a reaction
*******************************************************************/Â if (C_U(cell,thread) <= .000001)
 {
  source = C_YI(cell,thread, 1); }
 else
 {
  source =  0.;
 } return source;
}Â
Â
Â
However, the entire cell acts as a source. I would instead like for only the nodes that make up the wall to act as a source. How can I do that?
Â
Thank you!
-
July 29, 2022 at 9:30 am
Rob
Forum ModeratorÂ
There’s not a source term for walls, so you will need to add material to the whole cell. I suggest looking at the cell loop options, using a low velocity may cause problems if you have a recirculation zone. You can set a species flux/concentration at the walls, will that do?
Â
-
July 29, 2022 at 6:17 pm
zdfrankman
SubscriberHello Rob,
Â
A flux or source term will linearly add or subtract a species from the channel. I require a simulation to accurately model the concentration-dependent nature of a wall surface reaction.
Â
Is there a way to perform a wall surface reaction that does not also permit wall surface species diffusion through the wall?
-
-
August 1, 2022 at 11:02 am
Rob
Forum ModeratorWhere are you setting wall diffusion?Â
-
August 1, 2022 at 5:30 pm
-
-
August 2, 2022 at 8:46 am
Rob
Forum ModeratorThat's to let you disolve material off a wall as needed.Â
-
August 3, 2022 at 5:31 pm
zdfrankman
SubscriberUnderstood!
Â
Is there any way to prevent species diffusion through the wall during a wall surface reaction?
-
-
- The topic ‘UDF for source term only at edge walls’ is closed to new replies.
-
3462
-
1057
-
1051
-
918
-
896
© 2025 Copyright ANSYS, Inc. All rights reserved.