-
-
February 21, 2022 at 6:24 pm
MForbes
SubscriberI am trying to write a UDF to define the viscosity of a 50/50 mixture of ethanol and water. Below is the temperature-dependent formula used to write the UDF and the code I am trying to implement. Every time I try to interpret the code it throws a parse error. Any help towards solving this issue would be greatly appreciated.
Thanks
µ (50/50 Water-Ethanol) [Pa sec] = 2.48 × 10−8 × T^3 [K] + 2.47 × 10−5 × T^2 [K] − 8.22 × 10−3 × T[K] + 0.92;
#include "udf.h"
DEFINE_PROPERTY(cell_viscosity, c,t)
{
real mu_lam;
real T = C_T(c,t);
mu_lam = 2.48e-8 * pow(T,3.) + 2.47e−5 * pow(T,2.) − 8.22e−3 * T + 0.92;
C_UDMI(c,t,2.) = mu_lam;
return mu_lam;
}
February 22, 2022 at 1:37 pmKarthik R
AdministratorHello Have you tried compiling this UDF? Also, did you define the necessary UDMIs for your simulation run?
Karthik
February 22, 2022 at 2:44 pmRob
Ansys EmployeeAlso, UDMs are integer indexes, 2. will cause a problem and is the third UDM in your system.
Viewing 2 reply threads- You must be logged in to reply to this topic.
Ansys Innovation SpaceBoost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.
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.
Ansys Blog
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.
Trending discussions- 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
Top Contributors-
3778
-
2587
-
1831
-
1242
-
598
Top Rated Tags© 2023 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.
-