August 20, 2018 at 6:56 pmfuad87Subscriber
I have written an UDF for my UDS. Now I need to use the gradient of that UDS to the momentum eqn as source. The problem is that the gradient of the UDS (C_UDSI_G(c,t,i)[j]) is not available when momentum equation is being solved unless I input "yes" to this “Keep temporary solver memory from being freed?”. But keeping memory is not available in parallel, hence I can use my code only in serial. How can I store the gradient of the UDS and use it as source to the momentum in parallel? TIA
August 20, 2018 at 8:26 pmDrAmineAnsys Employee
Which release are you using?
August 20, 2018 at 8:29 pmfuad87Subscriber
I am using 17.2 academic
August 21, 2018 at 5:51 amDrAmineAnsys Employee
With the documented way to obtain gradients (via Keep temporary solver memory from being freed? yes) I am able to obtain gradient for my UDS in parallel (R19.1).
August 21, 2018 at 10:20 pmfuad87Subscriber
I couldn't do it in parallel. I don't know why. So tried this, but an error saying "Scalar_Reconstruction" is undefined variable.
int phase_domain_index = 0; /*primary phase index is 0 */
domain = DOMAIN_SUB_DOMAIN(d,phase_domain_index);
for (n=0; n
MD_Alloc_Storage_Vars(domain, SV_UDSI_RG(n), SV_UDSI_G(n), SV_NULL);
Scalar_Reconstruction(domain, SV_UDS_I(n), -1, SV_UDSI_RG(n), NULL);
Scalar_Derivatives(domain, SV_UDS_I(n), -1, SV_UDSI_G(n), SV_UDSI_RG(n), NULL);
liq = THREAD_SUB_THREAD(t,phase_domain_index);
C_UDMI(c,t,0) = C_UDSI_G(c,liq,0);
C_UDMI(c,t,1) = C_UDSI_G(c,liq,1);
C_UDMI(c,t,2) = C_UDSI_G(c,liq,1);
C_UDMI(c,t,3) = C_UDSI_G(c,liq,2);
August 22, 2018 at 8:12 amDrAmineAnsys Employee
The documented approach is working for me in parallel. The approach you are posting is not documented and not supported. Anyway I managed to have gradients based on that approach. Alloc_Storage_Vars is the right function at first. Please help your self by writing debugging messages as they helped me actually to debug the errors.
- You must be logged in to reply to this topic.
Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Suppress Fluent to open with GUI while performing in journal file
- Floating point exception in Fluent
- What are the differences between CFX and Fluent?
- Heat transfer coefficient
- Getting graph and tabular data from result in workbench mechanical
- The solver failed with a non-zero exit code of : 2
- Difference between K-epsilon and K-omega Turbulence Model
- Time Step Size and Courant Number
- Mesh Interfaces in ANSYS FLUENT
- error in cfd post
© 2023 Copyright ANSYS, Inc. All rights reserved.