Terminate Fluent when body reaches a temperature
Hey,
I'm really new to using Fluent and I need to run a multiphysics heat transfer simulation. Basically I am cooling an aluminium block by passing water through channels on the surface. The initial temperature of the block is 500K and the water temperature is 300K. The way I am setting the temperature of the block is using the patch setting after initialisation. Is the the best? The main question though is how do I tell fluent to stop solving when the temperature of the block is at or below 350K? I haven't been able to work this out. If someone could help it would be excellent Cheers |
You can do that with a DEFINE_EXECUTE_AT_END udf. The udf would calculate the average temperature in the domain at each timestep, and then an if condition would follow in the udf to stop Fluent if some average T is reached.
|
Is it possible to do this from the GUI? I am guessing not.
So far I have managed to cobble this lot together Code:
Finally, if I am sending this to a linux HPC using PBS, so my question then becomes; am I wasting my time? From what I have read, your UDF script is local and not included in the case file. Is this true? |
Maybe an if condition in Calculation Activities\Execute Commands... Look here to see an example of how to implement an if condition: http://www.cfd-online.com/Forums/flu...tml#post387848
By the way, that's the kind of stuff that is soooo easy to figure out in Comsol and will take hours to work out in the prehistoric Fluent interface. |
Sorry to be a hassle here, but I really have no clue as to what I am doing. I read the thread you recommended, but I still haven't a clue if I am on the right track (or any track) in terms editing and writing these functions to suit my purpose. I have no idea how to get the Execute command 'if' condition to link to the UDF which calculates the average temperature, not what should be included in the UDF. Moreover, I haven't a clue about writing the UDF.
I could simplify the problem to a the average temperature on a surface. Does this make the UDF any easier to write? Quote:
|
1 Attachment(s)
Ok here is how:
1. define a scheme variable in Fluent TUI: (rp-var-define 't_vol_avg 0 'real #f) 2. interpret the following udf which will calculate volume-weighted temperature and assign the result to the scheme variable: Code:
#include "udf.h" 4. The value of the scheme variable can be retrieved in Fluent with: (rpgetvar 't_vol_avg) Therefore we can implement an interrupting condition in Execute Commands, see attached picture. Try with a simple 2D square transient conduction model. Initial T of solid at 500 K and all boundaries at 300 K. |
Thanks a million for this. I haven't had a chance to try it just yet. Hopefully sometime today :)
Cheers |
All times are GMT -4. The time now is 16:31. |