-
-
March 24, 2022 at 12:01 pm
epanunzio
SubscriberHi all,
I'm working on a transient simulation in Fluent (R2020 R2). The goal is to predict the time needed to heat up a plate with water, considering the transient phase of the water heating process too.
Let's say that I have 10 kW of power to heat up the water (heat capacity c), a "virtual tank" of 10 kg (which is not present in the simulation but I think I should take into account the total water quantity inside the heater) and a water mass flux of 0.1 kg/s.
For a certain dt, I imagine the process as:
- 0.1*dt kg of water returns into the heater at the exit of the plate, at a temperature Tcold. This temperature is the average over the outlet boundary.
- the previous water mixes inside the tank, reaching an equilibrium temperature;
- the heater gives energy to the total mass of water, raising its temperature to Thot;
- the heater pumps out 0.1*dt kg of water at temperature Thot. This Thot is used as boundary condition over the inlet.
To recap, water inlet temperature is a function of the water outlet temperature, mass flux and heater power.
So, a general expression of Thot is = (Thot(timeStep-1)*10 kg + Tcold*0.1*dt kg)/(10+0.1*dt)kg + 10 kW*dt/((10+0.1*dt)kg * c
From the theory this should work, but in practice I don't understand what Ansys is picking up as Thot(timeStep-1) and Tcold. Below, I attach a picture that shows the expression with the "expected" result, starting from Thot = Tcold = 293.15 K:
March 25, 2022 at 1:00 pmKarthik Remella
AdministratorHello:
How are you picking up the temperature in the previous time-step (t-1)? I think you may need to use a UDF.
March 25, 2022 at 1:40 pmepanunzio
SubscriberHi Kremella the temperature T(t-1) is the T average over the inlet. After all, I don't see any difference compared to the expression example that ANSYS user guide provides at this link and that I used as a starting point:
5.4.3. Controlled Outlet Temperature (ansys.com)
The fact is that my Tadjust is correct when I update its value inside the expression editor (293.155 K), but the actual inlet temperaure after one iteration is 293.268 K while should be equal to Tadjust.
March 25, 2022 at 3:20 pmRob
Forum ModeratorTry MassAve rather than Average. I'm not sure how the latter is derived.
March 25, 2022 at 3:53 pmAmine Ben Hadj Ali
Ansys EmployeeTransport Quantities:-> Use Mass Weighted Average! (even if the example is not using it).
Is not 100% like the method in the example: I do not understand the process you are describing but maybe I am tired and should start the weekend. Moreover if you want to access value of previous time step: you require UDF for now (we will make that better) or using some UDM kind of patching workaround.
March 28, 2022 at 2:14 pmepanunzio
SubscriberHi Rob, Hi DrAmine I haven't tried "Mass Weighted Average" instead of "average" yet. What I did is to test the method described with a stationary analysis and... it worked! Unfortunately, what I'm looking for is not a steady analysis with adjustable inlet condition, but a true time-dependent boundary condition, so I think I will go through the UDF.
I will update you in case the mass weighted average works with an unsteady analysis.
Regards Enrico
March 28, 2022 at 7:24 pmKarthik Remella
AdministratorHello:
If you wish to obtain the data at a previous time step, you will need to use a UDF. As Amine mentioned, we may be able to use Fluent Expressions for this in the future (not at this point).
Karthik
March 29, 2022 at 8:58 amAmine Ben Hadj Ali
Ansys Employee:)
March 29, 2022 at 1:34 pmepanunzio
SubscriberLittle update: I can confirm that the steady example case is working because the previous temperature is accessible only in terms of iteration. Since a steady case works with iterations, the approach seen in section 5.4.3 of Ansys User Guide is ok. In order to work with an unsteady case, the "max iteration/time step" value MUST be equal to 1 to emulate a steady analysis in terms of iteration - temperature accessibility. The problem is that only one iter/time step is not sufficient to ensure stability...
Thanks for all you support by the way.
Regards Enrico
March 29, 2022 at 2:41 pmAmine Ben Hadj Ali
Ansys EmployeeYes that is probably the reason.
You are welcome
Viewing 9 reply threads- The topic ‘Problem while using expressions’ is closed to new replies.
Innovation SpaceTrending discussionsTop Contributors-
4673
-
1565
-
1386
-
1231
-
1021
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