-
-
February 3, 2022 at 9:09 am
Chinchedu
SubscriberHi Everyone, I'm able to compile User Defined Function(UDF) for varying property using DEFINE_PROPERTY. But when trying to build UDF for source term using DEFINE_SOURCE, then I'm getting an error as "NMAKE: fatal error U1073: don't know how to make '....srcudf' ". And when trying load "Error at host: The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform (win64)".
What could be the reason, please let me know if anyone knows the solution to this problem.
February 3, 2022 at 10:57 amRob
Forum ModeratorIt means the Visual Studio install didn't go to plan. There's an inbuild Clang compiler in 2020rx and onwards so use that.
February 4, 2022 at 12:01 pmChinchedu
SubscriberThanks Rob. I'm working on phase change (evaporation-condensation) here I have mass and energy source in continuity and energy equation respectively based on saturation temperature using VOF method. And I have written UDF's using SOURCE macro, hooking mass source terms in respective phases under cell zone conditions and energy in mixture phase under cell zone conditions. Now, I got an error as "Node 0: Process 13932: Received signal SIGSEGV. The f1 process could not be started." What does this error mean.
When I tried simulating only with energy source in mixture phase then it worked properly. I think the problem is with the mass source term.
February 4, 2022 at 3:46 pmRob
Forum ModeratorRun one time step and then add the UDF. Some of the VOF terms are calculated at the end of the time step so the values you need in the UDF may not exist. Otherwise work through the code to see what you're doing.
February 7, 2022 at 6:33 amChinchedu
SubscriberThanks Rob, now I'm able run simulations. Actually in my governing equations there are mass and energy source terms. For which I have written Udf's using DEFINE_SOURCE macro for both the mass and energy transfer source terms. And I'm using VOF (Volume of fluid) method. But I'm unable to see any phase interactions between the vapor and liquid.
My question is only DEFINE_SOURCE macro is sufficient or else do I need any additional Udf's like creating neighbor cell and liquid volume, etc,.
These are my governing equations:
February 7, 2022 at 4:53 pmRob
Forum ModeratorThe VOF model should take care of the phase interaction. What, and where are you adding the source terms?
February 7, 2022 at 5:35 pmDrAmine
Ansys EmployeeVOF model assumes that the sum of phase interaction when it comes to momentum is zero on mixture level (neglecting surface tension effects now) no mass on mixture level and just energy source term to account for latent heat times mdot plus sensitive part as the code is using Tref = 298 K and SS is not taken into account. To avoid all of this: use a dedicated phase change UDF macro where you don't need to take care about all secondary fluxes
February 8, 2022 at 10:20 amChinchedu
SubscriberHi Rob, I have written Udf's of mass source terms for both liquid and vapor phases separately and adding them to their respective phases under cell zone conditions. Even, wrote Udf for energy source term and added it to the mixture phase in cell zone conditions. Below I'm posting my Udf for liquid mass source term, please check is it correct.
February 8, 2022 at 10:25 amChinchedu
SubscriberHi DrAmine, Is the example given in Udf manual of DEFINE_MASS_TRANSFER, is it the Lee model? and does it consider the energy transfer due to phase change (i.e. latent heat). Are their any other dedicated phase change UDF macro.
February 8, 2022 at 11:15 amRob
Forum ModeratorLooking at the code I won't comment on the amount of source, but the ELSE part of the statement doesn't look to do anything useful. Note, for VOF you need to be very careful that you're adding enough phase into the system as it's not designed to track cells with "some" other phase, VOF is intended to track the free surface.
February 8, 2022 at 2:42 pmDrAmine
Ansys EmployeeDEFINE_MASS_TRANSFER does not require from you any additional Energy consideration.
Viewing 10 reply threads- The topic ‘UDF unable to compile’ is closed to new replies.
Ansys Innovation SpaceTrending discussionsTop Contributors-
3622
-
1303
-
1122
-
1068
-
1008
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.
-

Ansys Assistant

Welcome to Ansys Assistant!
An AI-based virtual assistant for active Ansys Academic Customers. Please login using your university issued email address.

Hey there, you are quite inquisitive! You have hit your hourly question limit. Please retry after '10' minutes. For questions, please reach out to ansyslearn@ansys.com.
RETRY