TAGGED: expression, fluent, species, udf
-
-
June 29, 2025 at 1:22 am
-
June 30, 2025 at 9:05 am
Rob
Forum ModeratorYou've only really got access to the diffusivity, so it's not overly simple. What is the extra term for?
-
June 30, 2025 at 2:18 pm
Shyam Prasad V Atri
Subscriberthe extra term is to account for a separate drift velocity of the field (vec(c)). i thought of adding it as source term but the source term is adding or removing species right. Can we do it that way? if so can you please suggest how?
-
June 30, 2025 at 2:30 pm
Rob
Forum ModeratorWon't convection of the flow handle that?Â
-
June 30, 2025 at 2:36 pm
Shyam Prasad V Atri
Subscriberconvection only has fluid velocity field. I have another field acting in the domain.Â
-
June 30, 2025 at 2:57 pm
Rob
Forum ModeratorIf you're thinking of species drift and separation then you're breaking the species model mixture assumption. The multiphase models allow for phase specific forces but don't have diffusion. There's nothing stopping you having a species volume fraction linked source term.Â
-
June 30, 2025 at 3:11 pm
Shyam Prasad V Atri
Subscriberno so the extra drift velocity is acting on all species. I am adding the body force term in the momentum equation to account for that.
-
July 4, 2025 at 5:56 pm
Shyam Prasad V Atri
Subscriberso i am able to make the source term work. but the drift velocity and inlet velocity is different (but the values are correct). and my simulations are diverging I don't know why and how to fix it if inlet velocity is 0.1m/s my drift velocity is 3m/s if the difference is so steep. How can I prevent divergence? I would appreciate any input.
-
July 8, 2025 at 11:00 am
Rob
Forum ModeratorIf you're accelerating mass so that it's faster than the inflow, what fills the empty space?Â
-
July 14, 2025 at 11:52 pm
Shyam Prasad V Atri
Subscriberi have inlet velocity condition. and i was running it in transient mode. it still diverged. so I am trying to run it in steady state using UDS instead of species model.Â
-
July 15, 2025 at 8:50 am
Rob
Forum ModeratorIf you set pressure on both ends of the model and a zero pressure drop how does your code perform? What happens to the flow?Â
-
July 15, 2025 at 5:13 pm
Shyam Prasad V Atri
Subscriberso currently i have inlet velocity and pressure outlet.
you are saying make both as pressure outlet is it?
i cant do that because uds had a value of 1 at the inlet and it flows into the domain. But even if I tried to give that I get reverse flow and I get same results as what I was getting when I have velocity inlet. Anyway I fixed the divergence problem but now there is another problem where the value of uds is going above 1. I give inlet value as 1 and as the uds is solved its value becomes more than 1. why would this happen? and how to fix it
-
July 16, 2025 at 7:39 am
Rob
Forum ModeratorThe idea was to see how the UDF was pulling the flow - ie what is it doing to the flow without an assist from the inlet. Good to know it's working.Â
Re the scalar value, if the value on the inlet is 1, what happens as the scalar is pushed into adjacent cells? Species has a cap on volume fraction, there aren't as many checks on scalars as they for doing "stuff" with.Â
-
July 16, 2025 at 6:28 pm
Shyam Prasad V Atri
Subscriberso as the scalar moves to adjacent cells the mass flux udf acts on it and the convective velocity is modified. so suppose I want to limit the value of the species where should I do it? I am using this Solution method : Pressure velocity coupling : scheme : Simple . based on this when I look at the documentation I see this is the solution sequenceÂ
Now based on this can you please tell me at which point in the flow chart the uds is solved. I will put a check to limit the uds to not exceed 1 at that point. Can you please tell me which udf should I use to limit the value of uds?
-
July 17, 2025 at 2:40 am
Shyam Prasad V Atri
SubscriberHey i found a way to limit the uds to a value of 1 by using execute in end. But that is not complete solution. I have two almost identical udf but one of them causes the numerical instability the other also does but it stops at 1.1.
the uds gets accumulated around the wall in the inflation region. like thisÂ
how to fix this issue? please let me know
-
July 17, 2025 at 10:11 am
Rob
Forum ModeratorReplot with node values off. I'd expect some diffusion but also have no idea how long the model has been running, how the flow is and what your UDF is doing.Â
-
July 17, 2025 at 2:27 pm
Shyam Prasad V Atri
Subscriberno that is not the problem.
So I have the adjust function where I am taking a gradient of potential and computing electric field
I want to store the value of the gradient in the faces. To do that, I do this.
If I put the value of the computed gradient in the face, I get the solution above.
if I comment out line 83-94 I see a correct result
Is there any better way of doing this? There is still one or two cells where the high number occors. The simulations are converged and the velocity field is correct
Any suggestions would be helpful
 -
July 17, 2025 at 2:28 pm
-
July 17, 2025 at 3:17 pm
Rob
Forum ModeratorCheck the cell sizes - are you adding a value per cell or per m^3 in the near wall cell?Â
-
July 17, 2025 at 3:43 pm
-
July 17, 2025 at 3:50 pm
Rob
Forum ModeratorI'm not commenting on code. The query about cell or m3 was whether you were adding the scalar at the same rate into the same space.Â
-
July 17, 2025 at 4:18 pm
Shyam Prasad V Atri
Subscriberi dont understand what statement and what it has to do with volume?
I am controlling the rate of addition of scalar based on drift velocity. It is computed to every cell in the mass flux udf.
are you suggesting I compute velocity per unit volume? i am not sure what is the meaning of this statement "The query about cell or m3 was whether you were adding the scalar at the same rate into the same space. "
Â
-
July 18, 2025 at 8:53 am
Rob
Forum ModeratorI don't know what you are adding where, I am giving general pointers to remain within the Forum rules for staff. Source terms add a "value" into a cell, and depending on your maths you may, or may not, account for cell volume when doing this.
If you are adding based on velocity is that speed, u, v or w component or something else? How does it account for zero velocity and recirculation zones?Â
-
- You must be logged in to reply to this topic.
-
3492
-
1057
-
1051
-
965
-
942
© 2025 Copyright ANSYS, Inc. All rights reserved.