-
-
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
Forum ModeratorYou 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
Forum ModeratorIf 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
Forum ModeratorCorrect, 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
Forum ModeratorCan 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
Forum ModeratorDid 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
SubscriberÂ
I 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
Forum ModeratorBut 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
Forum ModeratorIs "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
SubscriberÂ
Yes, 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
Forum ModeratorI'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
Forum ModeratorZero'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
Forum ModeratorOK, 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
Forum ModeratorThey 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
Forum ModeratorThe 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
Forum ModeratorHave 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
Forum ModeratorTime 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
Forum ModeratorThat 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
Forum ModeratorThe 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
SubscriberÂ
Do 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
Forum ModeratorStay 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
Forum ModeratorWhat 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
Forum ModeratorAnd 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
Forum ModeratorAnd 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
Forum ModeratorProbably 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
Forum ModeratorYes, but the logic could be interesing if you're not careful. Most things can be done, but it's not always simple.Â
-
- The topic ‘Cold Plate Boundary Condition’ is closed to new replies.
-
3044
-
971
-
858
-
852
-
792
© 2025 Copyright ANSYS, Inc. All rights reserved.