-
-
March 6, 2023 at 7:26 pm
Umair Syed
SubscriberHi,
I am designing a cold plate but I want to input conditional volume flow rate dependent on cold surface temprature. For example if the temp increases to 350K i want the mass flow rate to be 0.0446 kg/s if it is lower than 350 I want to turn off the flow rate to 0. I cant write a UDF can this be achieved using expression editor? If so how?
-
March 7, 2023 at 4:21 pm
Rob
Ansys EmployeeYou can use IF statements in Expressions. Start here https://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v231/en/flu_ug/flu_ug_expressions.html
-
March 7, 2023 at 8:30 pm
Umair Syed
SubscriberI used the expression:
IF(WallTemprature>350[K], 0.0446[kg/s],0[kg/s])
But the mass flow rate remains 0.
I also cant access the link as my account is a free email not institute linked.
-
March 7, 2023 at 8:34 pm
Umair Syed
SubscriberI am applying 3200 W/mK. So wall temp should increase to more than 350K.
-
March 8, 2023 at 9:34 am
Rob
Ansys EmployeeIf you click on Help in Fluent it'll add a token/cookie/biscuit to the browser. The link I gave you then works.
How is the wall defined, and what report did you use for "WallTemperature"?
-
March 8, 2023 at 9:43 am
Umair Syed
SubscriberHow to define the wall? I thought is was the solid region on which heat flix was applied. The region appeared as wall under boundary conditions.
For the report I plotted massflow against tine. Can I send you the project so you can have a look at it?
-
March 8, 2023 at 1:44 pm
Rob
Ansys EmployeeCorrect, but what thermal condition did you set on the wall? Heat flux, temperature, convection etc.
What is the definition of the report "WallTemperature"?
We (staff) are not permitted to take files, we can only review images and notes that are posted in public.
-
March 8, 2023 at 3:03 pm
Umair Syed
Subscriber-
March 8, 2023 at 3:04 pm
-
-
-
March 8, 2023 at 3:57 pm
Rob
Ansys EmployeeCan you post the WallTemperature report definition too. I'd also question any model with a time step of 1s and when drawing conclusions from 4 time steps.
-
March 10, 2023 at 2:39 am
Umair Syed
SubscriberI increase the timesteps to 300 seconds. Alos the condtions I put earlier are not working Error: expression not valid. I changed the condtions to IF (StaticTemprature>300[K], 0.0446[kg/s],0[kg/s]) and plotted the results. The surface tempraure of the wall increases linearly. I think the issue is the StaticTemprature Condition as it solely depends on mass inlet which does not increase to above 288[K]. How should I write the condition if I want the wall temprature (Part 1:003) not to exceed 300[K]
-
March 10, 2023 at 2:55 am
Umair Syed
SubscriberI also tried IF(maximum(TotalTemprature,[part 1:003])>350[K], 0.0446[kg/s], 0[kg/s]) but it also doesnt work
-
-
March 10, 2023 at 9:20 am
Rob
Ansys EmployeeDid you create an expression of the wall temperature and then use that for the inlet, or use the inlet temperature?
-
March 10, 2023 at 9:30 am
Umair Syed
SubscriberI just used walltemprature from variable list. So under BC inlets i selected new expression then under variables i selected temprature then wall temp.
-
March 10, 2023 at 9:34 am
Umair Syed
SubscriberI but i also tried a different expression that doesnt this too was input at the mass flow inlet expression.
-
-
March 10, 2023 at 9:32 am
Rob
Ansys EmployeeBut without setting a location for that temperature?
-
March 10, 2023 at 9:35 am
Umair Syed
Subscriber -
March 10, 2023 at 9:40 am
Umair Syed
SubscriberSorry, I dont understand your question. The second tine I did set the location as replied above.
-
-
March 10, 2023 at 9:44 am
Rob
Ansys EmployeeIs "part 1:003" the wall? What if you get a report for the wall and then use that in the flow expression?
-
March 10, 2023 at 9:57 am
Umair Syed
SubscriberYes, part1:1003 is the wall, heat flux is applied to. I dont know how to get the report and use it in expression. Can you provide the expression? My project's deadline is approaching and I have taken my project supervisor’s permission to take outside help.
-
-
March 10, 2023 at 10:28 am
Rob
Ansys EmployeeI'm not able to give specifics on here due to the rules we must work to. I suggest creating a report (Report Definition, menu on left side of Fluent: NOT an expression) on the wall, then look at how you can use that in an Expression.
-
March 10, 2023 at 5:52 pm
Umair Syed
SubscriberIF({report-def-1}>290[K],0.0446[kg/s],0[kg/s]), I used this and the report definition was vertex maximum, wall temperature of 1:003. But I am getting a floating point error now when 290 is reached.
-
-
March 13, 2023 at 10:08 am
Rob
Ansys EmployeeZero's can be awkward in boundary settings, try 0.00001 instead. The other possibility is the shock to the solution is sufficient to cause the solver some problems, what time step are you using?
-
March 13, 2023 at 10:58 am
Umair Syed
SubscriberI am using 1s. But I think a smaller time step would be better. I used 0.0001 it is more stable however after further iteration it crashes.
-
-
March 13, 2023 at 12:00 pm
Rob
Ansys EmployeeOK, so the expression is working, but the change is messing with the solver. Next step is to see what's going on in the flow.
-
March 13, 2023 at 1:24 pm
Umair Syed
SubscriberYes, the residual rise considerably as the volume flow rate is changed
-
-
March 13, 2023 at 1:47 pm
Rob
Ansys EmployeeThey will. So, you may need to look at a slower rate of change or the like. Also, any instant cut off could cause the solution to oscillate: turning the flow off could trigger the temperature to rise & turn the flow back on, then off as the temperature drops in the next time step.
Have a look at feed forward and feed back control theory: all I remember from my Uni course is that you spec out the valves etc to withstand the pressure and material (corrosion resistant etc) then find a specialist!
-
March 13, 2023 at 1:56 pm
Umair Syed
SubscriberInstead of turning on the volumeflow rate instantly is there a way to gradually incrase the volumeflow rate by altering the condtions in the expression? I am trying to multiply by time but it the time is absolute value.
-
March 13, 2023 at 1:57 pm
Umair Syed
SubscriberAlso can this control theory be incoporated in Ansys? Can the oscillations of temprature fluctuation be modelled?
-
-
March 13, 2023 at 3:13 pm
Rob
Ansys EmployeeThe oscillations and control functions can be added via UDF. Not sure about expressions simply because of the complexity of the maths and potential need for retaining a previous time step value(s). It's not an easy option so tread carefully.
For a gradual change you'd need to add a more complex set of IF statements, so you'd finish up with a max, min and intermediate. Intermediate would be a function of temperature in some way. Again not so easy, but probably easier than a UDF. Nesting three options into an expression might be a fun exercise though, so, again it may need a UDF. It'll be easier than the full control system though.
Expressions are fairly new to Fluent (3-ish main releases) so what can't be done now may be available next time. That does make support more complex as we're always supporting 2-5 older versions, current release and often testing next release. Not forgetting input into the future plan.....
-
March 13, 2023 at 4:47 pm
Umair Syed
SubscriberI also tried to vary heat flux as a function of time and imported the txt file. However, I am still getting a floating point error. I reduced the step size to 0.1 seconds and the heat varies every 5 seconds.
-
-
March 13, 2023 at 5:19 pm
Rob
Ansys EmployeeHave a look at the flow, temperature and residuals. As it works OK with fixed values, and with expressions calling fixed values the likely cause is "shock" when the flux changes.
-
March 13, 2023 at 5:26 pm
Umair Syed
SubscriberHow can I deal with the shock? Do I change the solver?
-
-
March 13, 2023 at 5:27 pm
Rob
Ansys EmployeeTime step I suspect. That and review how the models interact. It's not an easy diagnosis, and I'm very limited via the Forum.
-
March 13, 2023 at 5:46 pm
Umair Syed
SubscriberIs there any way other than the forum?
-
-
March 14, 2023 at 9:45 am
Rob
Ansys EmployeeThat will depend on your University licence. We're here to help, but on here only within some very strict limits.
-
March 14, 2023 at 10:02 am
Umair Syed
SubscriberWhat forum requires university license? I study at Imperial College
-
-
March 14, 2023 at 12:24 pm
Rob
Ansys EmployeeThe forum doesn't require a licence: however the rules I have to work to mean I can't download any files so it's images only.
One thought. When you turn off the flow there's a "shock" in the system. In reality that may be seen as water hammer or another density effect on the flow. Try the compressible liquid or ideal gas and see if that helps.
-
March 14, 2023 at 1:25 pm
Umair Syed
SubscriberDo you mean change the solver from pressure based to density based? I tried relaxation factor for density but it doesnt work. I also tried density solver that doesnt work as well.
The continuity residual is overshooting if thay could help.
-
-
March 14, 2023 at 1:58 pm
Rob
Ansys EmployeeStay with pressure based solver, and re-read my comment re the material density.
-
March 14, 2023 at 6:40 pm
Umair Syed
SubscriberI tried but same problem persists.
-
-
March 15, 2023 at 11:05 am
Rob
Ansys EmployeeWhat material density did you use?
-
March 15, 2023 at 5:32 pm
Umair Syed
SubscriberI used both the compressible liquid and gas law
-
-
March 16, 2023 at 9:58 am
Rob
Ansys EmployeeAnd how does the flow look as it's diverging?
-
March 16, 2023 at 10:32 am
Umair Syed
SubscriberThe continuity residual increases exponentially
-
-
March 16, 2023 at 3:57 pm
Rob
Ansys EmployeeAnd the flow?
-
March 16, 2023 at 5:08 pm
Umair Syed
SubscriberShould I create contours? The mass flow rate follows the same pattern as before.
-
-
March 16, 2023 at 6:03 pm
Rob
Ansys EmployeeProbably a good idea: you need to understand what's going on. Contours & vectors will help with that.
-
March 17, 2023 at 11:50 am
Umair Syed
SubscriberI think the condition (300K) is rigid can I introduce some lower limit to switch volume flow back on after the temperature rises again after initially turning the volume flow rate on?
-
-
March 17, 2023 at 12:00 pm
Rob
Ansys EmployeeYes, but the logic could be interesing if you're not careful. Most things can be done, but it's not always simple.
-
- 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
- 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
-
3812
-
2593
-
1849
-
1244
-
600
© 2023 Copyright ANSYS, Inc. All rights reserved.