-
-
January 28, 2021 at 4:19 pm
soloviev
SubscriberHello,I'm trying to write a UDF to implement a temperature based salinity in Fluent, but the temperature in the model is a profile (imported from a .csv). Is this possible? I have a UDF I used previously (see below), but I'm not sure how to implement the salinity based on the variable temperature profile, if even possible.nn#include udf.hnn}nDEFINE_PROPERTY(salinity_dens,c,t)n{ntreal pho_w, sigma_t;ntreal sal = C_UDSI(c,t,salinity); / in promillesntreal temp = C_T(c,t) - 273.15; nn / complex formula - see www.es.flinders.edu.au/~mattom/IntroOc/lecture03.htmlnn sigma_t = - 0.157406 + temp*(6.793952E-2 - temp*(9.095290E-3 - temp*(1.001685E-4 - temp*(1.120083E-6 - temp n*6.536332E-9)))) + n sal*(8.24493E-1 - temp*(4.0899E-3 - temp*(7.6438E-5 - temp*(8.2467E-7 - temp*5.3875E-9))) n - sqrt(sal)*(5.72466E-3 - temp*(1.0227E-4 - temp*1.6546E-6)) + sal*4.8314E-4);nntpho_w = 1000.0 + sigma_t; ntreturn pho_w;n}Thanks,nAlexnn -
January 28, 2021 at 4:40 pm
Rob
Ansys EmployeeIs salinity a straight mass fraction of salt in water, or is it a % of saturation? n -
January 28, 2021 at 5:08 pm
soloviev
SubscriberMass fraction should be sufficient n -
January 28, 2021 at 5:30 pm
DrAmine
Ansys EmployeeTemperature profile is it a boundary profile or transient one?n -
January 28, 2021 at 5:50 pm
soloviev
Subscriberthe temperature profile is a boundary profile. we are updating it every 1 minute with real temperature data we collected at the boundaries of the domain. n -
January 28, 2021 at 5:57 pm
DrAmine
Ansys EmployeeOkay and what about the salinity or where /what do you want to customize?n -
January 28, 2021 at 6:25 pm
soloviev
SubscriberWe'd like to apply a salinity property to the water phase based on the temperature. n -
January 29, 2021 at 10:48 am
Rob
Ansys EmployeeYou want to alter the mass fraction going into the domain based on temperature? Or change the whole domain? I'm a little confused on this one: it's been a long week....n -
January 29, 2021 at 12:40 pm
DrAmine
Ansys EmployeeYes Rob I am confused too: How is that salinity property defined in your case? Is is specie? Is it an UDS? Is it just a density? Do you want to do that only at entry or in the whole volume?n -
January 29, 2021 at 1:56 pm
soloviev
SubscriberWe do initialize the temperature in the entire domain, also using a volume profile / fixed value. Then fixed values are turned off after initializing. We did try setting density based on temperature (polynomial) and it gave us stratification, but we'd like to also implement salinity. We previously used salinity as a UDS in other models, but it was set at a specific area in the domain (i.e. a salinity plume that spread due to gravity current). n -
January 29, 2021 at 2:26 pm
Rob
Ansys EmployeeYou may want to look at using temperature dependent density and also adding in a second species for the higher salinity liquid plume? Mixture density is then a function of temperature and salinity. nI've seen the mixing of fresh and salt water when diving. It's often accompanied by a temperature change (4C fresh water & 6-8C salt water) and the two streams take a while to fully mix. n -
February 1, 2021 at 9:05 am
DrAmine
Ansys EmployeeThe species approach as mentioned by Rob is better here. You can then make the mixture density as a weighted sum of the density of the components. The density of component can be then set temperature dependent.n
-
- You must be logged in to reply to this topic.

Boost 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.
- 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
- Difference between K-epsilon and K-omega Turbulence Model
- The solver failed with a non-zero exit code of : 2
- Time Step Size and Courant Number
- Mesh Interfaces in ANSYS FLUENT
- error: Received signal SIGSEGV
-
5364
-
3363
-
2471
-
1310
-
1018
© 2023 Copyright ANSYS, Inc. All rights reserved.