-
-
March 6, 2023 at 7:26 pmUmair SyedSubscriber
Hi,Â
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 pmRobForum Moderator
You 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 pmUmair SyedSubscriber
I 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 pmUmair SyedSubscriber
I am applying 3200 W/mK. So wall temp should increase to more than 350K.Â
-
March 8, 2023 at 9:34 amRobForum Moderator
If 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 amUmair SyedSubscriber
How 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 pmRobForum Moderator
Correct, 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 pmUmair SyedSubscriber
-
March 8, 2023 at 3:04 pm
-
-
-
March 8, 2023 at 3:57 pmRobForum Moderator
Can 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 amUmair SyedSubscriber
I 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 amUmair SyedSubscriber
I 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 amRobForum Moderator
Did 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 amUmair SyedSubscriber
Â
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 amUmair SyedSubscriber
I 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 amRobForum Moderator
But without setting a location for that temperature?Â
-
March 10, 2023 at 9:35 amUmair SyedSubscriber
Â
Â
-
March 10, 2023 at 9:40 amUmair SyedSubscriber
Sorry, I dont understand your question. The second tine I did set the location as replied above.
-
-
March 10, 2023 at 9:44 amRobForum Moderator
Is "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 amUmair SyedSubscriber
Â
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 amRobForum Moderator
I'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 pmUmair SyedSubscriber
IF({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 amRobForum Moderator
Zero'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 amUmair SyedSubscriber
I 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 pmRobForum Moderator
OK, 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 pmUmair SyedSubscriber
Yes, the residual rise considerably as the volume flow rate is changed
-
-
March 13, 2023 at 1:47 pmRobForum Moderator
They 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 pmUmair SyedSubscriber
Instead 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 pmUmair SyedSubscriber
Also can this control theory be incoporated in Ansys? Can the oscillations of temprature fluctuation be modelled?
-
-
March 13, 2023 at 3:13 pmRobForum Moderator
The 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 pmUmair SyedSubscriber
I 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 pmRobForum Moderator
Have 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 pmUmair SyedSubscriber
How can I deal with the shock? Do I change the solver?
-
-
March 13, 2023 at 5:27 pmRobForum Moderator
Time 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 pmUmair SyedSubscriber
Is there any way other than the forum?
-
-
March 14, 2023 at 9:45 amRobForum Moderator
That 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 amUmair SyedSubscriber
What forum requires university license? I study at Imperial College
Â
-
-
March 14, 2023 at 12:24 pmRobForum Moderator
The 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 pmUmair SyedSubscriber
Â
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 pmRobForum Moderator
Stay with pressure based solver, and re-read my comment re the material density.
-
March 14, 2023 at 6:40 pmUmair SyedSubscriber
I tried but same problem persists.Â
-
-
March 15, 2023 at 11:05 amRobForum Moderator
What material density did you use?
-
March 15, 2023 at 5:32 pmUmair SyedSubscriber
I used both the compressible liquid and gas law
-
-
March 16, 2023 at 9:58 amRobForum Moderator
And how does the flow look as it's diverging?Â
-
March 16, 2023 at 10:32 amUmair SyedSubscriber
The continuity residual increases exponentially
-
-
March 16, 2023 at 3:57 pmRobForum Moderator
And the flow?Â
-
March 16, 2023 at 5:08 pmUmair SyedSubscriber
Should I create contours? The mass flow rate follows the same pattern as before.
-
-
March 16, 2023 at 6:03 pmRobForum Moderator
Probably a good idea: you need to understand what's going on. Contours & vectors will help with that.Â
-
March 17, 2023 at 11:50 amUmair SyedSubscriber
I 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 pmRobForum Moderator
Yes, 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.
- error udf
- Help: About the expression of turbulent viscosity in Realizable k-e model
- Unburnt Hydrocarbons contour in ANSYS FORTE for sector mesh
- Fluent fails with Intel MPI protocol on 2 nodes
- Cyclone (Stairmand) simulation using RSM
- Diesel with Ammonia/Hydrogen blend combustion
- Non-Intersected faces found for matching interface periodic-walls
- Mass Conservation Issue in Methane Pyrolysis Shock Tube Simulation
- Encountering Error in Heterogeneous Surface Reaction
- How to obtain axial and tangential velocity in CFX-post?
-
1141
-
471
-
468
-
225
-
201
© 2024 Copyright ANSYS, Inc. All rights reserved.