TAGGED: fluent, fluent-uds, udf
-
-
September 27, 2023 at 4:53 pmMemoriseXuxuSubscriber
I create a scalar transport equation using UDS in Fluent and I need to implement Neumann boundary, which can be expressed as Fig1.
Normally, the macro DEFINE_PROFILE is used for BC but it's always an equation whici is the Dirichlet BC. So, I wonder if the DEFINE_ADJUST is suit for me? What’s more, in terms of the Neumann BC, I don’t know how to code it T_T.
Moreover, the equation I solved is needed to calculate for many times since the deltaT is changed by me, that is, after flow equation solved once, my equation gets results(velocity pressure) from flow field and the deltaT is changed into 1/10 of the flow_deltaT.
However, the DEFINE_ADJUST is execute before the calculation of flow fields. Once my equation begins to solve, the DEFINE_ADJUST won’t work, that is, since my equation is needed to be solved 10 times in one flow time-step, in the first calculation of my equation, it works; but in the second calculation, it won’t work since the DEFINE_ADJUST is only execute once. Simply, if DEFINE_ADJUST can be used, how to maintain it during many calculation within one flow time-step.
Â
-
October 2, 2023 at 2:54 pmMemoriseXuxuSubscriber
Oh, no one can help me ?
-
October 2, 2023 at 3:55 pmSurya DebAnsys Employee
Hello,Â
This does not seem very trivial and I have not tested this at my end but the following can be tried:
1.) Convert the Neumann BC to Dirichlet type by breaking it into explict type as follows: P_n+1-P_n = c*delta_t*(P_x+1,n-P_x,n)/delta_x. Here P_n+1 is at the current time step and P_n is being used from previous time step. Yes, this will need multiple iterations to converge properly. P_n+1 can be found and applied as Dirichlet BC. The gradient can be found using in-built gradient macros. DEFINE_ADJUST or even DEFINE_PROFILE could be used here.
2.) Freeze the flow field once a single time step has been solved. This can be done by using TUI commands to unselect the flow and turbulence equations. Just have the UDS equation turned on.Â
3.) Decrease the time step to 1/10th of the existing flow time and then solve only the UDS equation till convergence.
4.) Once it is converged or desired number of UDS iterations have been achieved, unfreeze the flow and turbulence equations again.
5.) Change back the time step to your original flow time step.
6.) Also adjust the flow time accordingly as the UDS iterations were considered to be internal within one flow time. You can find relevant TUI commands to adjust this.
7.) Continue the steps and converge the flow field accordingly.
All of the above steps can be automated using scheme, TUI and Execute commands.
Since I have not tested them, so I cannot guarantee any accuracy or feasibility of the above solution.
You will need to test them using a very simple model and tweak the steps accordingly if needed.
I hope this helps.
Â
Regards,
Surya
Â
Â
Â
-
October 8, 2023 at 12:52 pmMemoriseXuxuSubscriber
Hello,Surya
    Maybe the BC in the fig is too complex. To be more details, if I need to apply zeroGradient on the boundary, like d ( C_UDSI(c, t, 0) ) / d n =0; I try to use C_UDSI_G = 0. However, it tells my that the value of C_UDSI_G can't be modified.Â
   So, which ways can I use?
Best wishes!
Memorise
-
-
- The topic ‘Fluent UDF: Implement Neumann BC in Fluent using UDF or UDS’ is closed to new replies.
- Non-Intersected faces found for matching interface periodic-walls
- 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
- Mass Conservation Issue in Methane Pyrolysis Shock Tube Simulation
- Script Error
- Facing trouble regarding setting up boundary conditions for SOEC Modeling
- UDF, Fluent: Access count of iterations for “Steady Statistics”
-
1406
-
599
-
591
-
555
-
366
© 2025 Copyright ANSYS, Inc. All rights reserved.