TAGGED: temperature-gradient, vof
-
-
July 20, 2021 at 5:11 pm
Dubey92
SubscriberI am trying to model laser melting. I have written 4 separate UDFs(4 separate C files) for energy term and the 3 momentum terms. When I run the simulation only with the energy source term, the simulation runs fine. Next, when I add the 3 momentum terms also, I face problem. In the momentum source terms, I need the gradient of temperature. I am using FLUENT 2020 R2. My basic doubts are:
- Since I have written momentum source terms in separate C files from that of energy, will I be able to access C_T_G(c,t)?
- I read somewhere that "Keep temporary solver memory from being freed?" is not available in FLUENT 2020 R2 and also not for multiphase flows if I am using Fluent in parallel.
- If both of the above are not possible, what is the way to get access to temperature gradient? Can it be done using UDSI and then getting its gradient, UDSI_G?
Any help is much appreciated.
Thanks
July 21, 2021 at 10:46 amRob
Forum ModeratorNot seen any issues with the gradient retention. Have you tried the command? It's fairly routine so we'd have heard from commercial users and colleagues by now.
Regarding the segmentation violation, run one iteration before you set up the source terms. You may be calling values before they exist in the solver memory: initialisation sets up the cell values, I'm not sure it also calculates the gradients.
July 21, 2021 at 11:25 amDubey92
SubscriberThanks for your reply. I have two source terms in the momentum equation. One uses temperature gradient and the other does not. The one which does not require temperature gradient is working fine. When I add the other term which requires temperature gradient, I try to access directly using C_T_G(c,t), then it shows segmentation fault.
Regarding the command, yes I have tried solve/set/expert but the major issue is that the question which it asks is Linearize Mass Transfer UDF?? instead of "Keep temporary solver memory from being freed?
Am I committing some mistake in running the command?
July 21, 2021 at 12:16 pmAmine Ben Hadj Ali
Ansys EmployeeWhere are u trying to access C_T_G?
July 21, 2021 at 12:19 pmAmine Ben Hadj Ali
Ansys EmployeeOkay in momentum sources terms you require to keep memory from being freed otherwise you cannot access gradient of temperature in source term for U, for example.
July 21, 2021 at 12:27 pmRob
Forum ModeratorYou need to keep going through that list. The third question is to keep the temporary data.
July 21, 2021 at 6:43 pmDubey92
Subscriber@Rob Thanks for your reply. I am a new user do didn't know that I have to keep going through that list and stopped after not seeing the freeing memory question the first time itself. So will it be yes for first two questions also?
July 21, 2021 at 6:49 pmDubey92
SubscriberThanks for your reply. Now I understand that. Also, somewhere I found a piece of code to allocate memory for temperature gradient, C_T_G(c,t). The lines are:
Alloc_Storage_Vars(domain, SV_T_RG, SV_T_G, SV_NULL);
T_derivatives(domain);
.........
your code....
.........
Free_Storage_Vars(domain, SV_T_RG, SV_NULL);
Free_Storage_Vars(domain, SV_T_G, SV_NULL);
Can you please tell if this works?
July 21, 2021 at 6:50 pmDubey92
SubscriberThanks for your reply. I am a new user do didn't know that I have to keep going through that list and stopped after not seeing the freeing memory question the first time itself. So will it be yes for first two questions also?
July 22, 2021 at 6:09 amAmine Ben Hadj Ali
Ansys EmployeeI won't comment that piece of code. As new user I will rather stick to the default workflow to get gradients and that is meant with keep memory from being freed
July 22, 2021 at 6:14 amAmine Ben Hadj Ali
Ansys EmployeeIf you are using the pieces of lines you are referring to: do not use that expert command under TUI. Bad to have it on where you are calculating the gradients and allocating them in the UDF. You see: better to stick to default workarounds as newbie.
July 22, 2021 at 6:49 amDubey92
SubscriberGot it. Thanks a lot. My simulation is running now.
July 22, 2021 at 8:15 amRob
Forum Moderatorthat depends what else you have set, I'd suggest accepting the defaults until you know what you're doing!
July 22, 2021 at 11:29 amDubey92
SubscriberThanks a lot for your reply.
July 22, 2021 at 11:33 amAmine Ben Hadj Ali
Ansys EmployeeGood that it works. Topic resolved then!
Viewing 14 reply threads- The topic ‘Gradient of temperature in momentum source term while using solidification/melting with VOF’ is closed to new replies.
Ansys Innovation SpaceTrending discussions- How do I get my hands on Ansys Rocky DEM
- Script Error
- Unburnt Hydrocarbons contour in ANSYS FORTE for sector mesh
- Help: About the expression of turbulent viscosity in Realizable k-e model
- convergence issue for transonic flow
- Facing trouble regarding setting up boundary conditions for SOEC Modeling
- Point exception in erosion calculation
- Errors with multi-connected bodies using AQWA
- Script Error Ansys
Top Contributors-
2342
-
925
-
599
-
591
-
527
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.
-