CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Defining transient "Black Body temperature (http://www.cfd-online.com/Forums/fluent/107122-defining-transient-black-body-temperature.html)

dsfakianakis September 18, 2012 07:35

Defining transient "Black Body temperature
 
Hello guys and girls,

I am currently performing a transient simulation of a room subjected to the outdoor weather conditions (air surrounding the room is modeled too). When setting up the boundary conditions for my inlet surface, under the radiation tab there is an option to define the "External Black Body Temperature method" which is the temperature of the sky vault which will be used for the radiation exchange between the wall and the sky (S2S radiation model used). Fluent allows you to define a different temperature than the boundary condition temperature however it doesn't allow you hook a UDF and change that temperature with time.

Does anybody have any clue on how I can define a transient black body temperature or in different words, how to define a transient parameter when fluent doesn't give me the option to hook a UDF?

Kind regards,

Dimitris

Bionico September 18, 2012 08:09

Hi dsfakianakis,
you could try using a journal file: for example every 100 iterations (or every # time steps) the simulation stops and that parameter is modified. Nevertheless in this case you can't introduce a function but only a number.

Regards

dsfakianakis September 18, 2012 08:24

Dear Bionico,

Thank you very much for your reply. Although I have never used a journal file, from your description I am quite sure I understand how it works, and is a solution to my problem, even a sketchy one! Since the values I want to insert can be predetermined (sky temperature as a function of the ambient temperature which is an input to my model) I am confident I will manage to find my way around my problem.

I will let you know if it worked.

Thanks a lot!!

Dimitris

Bionico September 18, 2012 09:18

I post an example of a journal I usually use to change the Under relaxation factors during a simulation

rcd folder/file.cas
it 100
/solve/set/under-relaxation/mom 0.3
it 100
/solve/set/under-relaxation/mom 0.7
....
wcd folder/file.cas
yes


:)

dsfakianakis September 18, 2012 13:40

Dear Bionico,

Thanks for your reply. I looked in the FLUENT user guide how to make a journal file however I couldn't locate any commands for the journal file (such as the command "it" you are using in the example you provided which I guess means iteration). I also did an online search and didn't find much. Is there some documentation available with instructions of how to write Journal Files?

Thanks

Dimitris

dsfakianakis September 18, 2012 14:20

So,

Turns out I didn't know exactly what I was searching for! Just found out that journal file programming is called "Fluent Scheme programming" and that the only documentation available is some text translated to English from German. After some experimenting I concluded that the commands I need are the:

solve/dual-time-iterate
;Number of physical time steps [24]
1
;Number of iterations per time step [20]
,
;change the black body temperature here
solve/dual-time-iterate
.
.
.

However if there is any more documentation or you want to share some tips you are welcome to do so!

Thanks again for your help.

Dimitris

Bionico September 19, 2012 03:42

Hi Dimitris,
unfortunately I found only that german text, too.
Usually when I want to know the commands to use in the scheme I Start a Journal File (File---> Write---->Start Journal) in order to record all the commands that the simulations should do automatically (I suggest using TUI because GUI-commands are a bit complicated), then Stop Journal and I copy the commands in the File to be loaded when I start Fluent.

I know also that you can use some abbreviations (like "it" instead of "iterate") :)

Hope to be helpful

Flavio

NormalVector September 19, 2012 12:51

Can you read a Profile into your simulation? It's basically a set of discrete boundary condition vs. time data. Take a look:
http://hpce.iitm.ac.in/website/Manua...ug/node301.htm

dsfakianakis September 19, 2012 13:14

@Bionico

I managed to create the journal file according to my needs and run the simulation. Although it is not a very elegant solution, it worked perfectly! It is a very useful tool especially in order to automate processes and produce large amounts of data. Thank you so much for your recommendations and help.

@Normal Vector

Thank you for your reply. I looked in the ANSYS FLUENT 14.0 User guide how to write profile files however I came across this:

"The Write Profile dialog box allows you to create a profile file from the conditions on a specified cell zone or boundary/surface".

As I noticed the option to write a profile file is available only after I have started the simulation and have generated data.

Does this mean that the profile can only be derived by the results of a simulation?
Is there an official Profile File programming language (like the scheme language for journal files) in order to write a profile file from scratch according to my needs?

Thank you very much for your time to deal with my problem.

Dimitris

dsfakianakis September 19, 2012 13:28

Dear Normal Vector,

Just to add something to my previous post, I went to the "Boundary Conditions" tab and clicked the "Profiles..." button and after selecting the surface of interest (pressure-outlet) there is no option to create a profile for the "Black Body Temperature". Does this automatically rule out any chances of changing that parameter with time with a profile?

Kind regards,

Dimitris

NormalVector September 19, 2012 13:30

Quote:

Originally Posted by dsfakianakis (Post 382603)
@Bionico

I managed to create the journal file according to my needs and run the simulation. Although it is not a very elegant solution, it worked perfectly! It is a very useful tool especially in order to automate processes and produce large amounts of data. Thank you so much for your recommendations and help.

@Normal Vector

Thank you for your reply. I looked in the ANSYS FLUENT 14.0 User guide how to write profile files however I came across this:

"The Write Profile dialog box allows you to create a profile file from the conditions on a specified cell zone or boundary/surface".

As I noticed the option to write a profile file is available only after I have started the simulation and have generated data.

Does this mean that the profile can only be derived by the results of a simulation?
Is there an official Profile File programming language (like the scheme language for journal files) in order to write a profile file from scratch according to my needs?

Thank you very much for your time to deal with my problem.

Dimitris

That's for writing a profile from a simulation, but you can write your own profile containing temperature vs. time data points and read it in similar to hooking a UDF. There is a specific format the file must have but no coding is required. I'm currently using profiles to apply transient mass flow boundary conditions and it's much easier than writing a UDF.

dsfakianakis September 19, 2012 13:40

Dear NormalVector,

Thank you for your reply. Since there is a specific format, is there any documentation available on that? Could you share a very simple example of how to define a mass flow boundary condition that changes with time?

Kind regards,

Dimitris

NormalVector September 19, 2012 13:58

1 Attachment(s)
Sure, the general format is inside of the link I sent above but specifically here:
http://hpce.iitm.ac.in/website/Manua...ug/node303.htm

Attached is an example. The first entry is the boundary condition name, the next declares it's transient, the next entry is the number of data points and the last entry is whether or not it's periodic (double check that, not sure). Note that the extension really should be .prof, not .txt.

dsfakianakis September 20, 2012 05:59

Dear NormalVector,

Thank you very much for your quick reply and the interest in my problem. Your example is very helpful however as I mentioned to a previous post I cannot seem to detect the "black body temperature" in the list of boundary conditions for the velocity-inlets and pressure-outlets.

Dimitris


All times are GMT -4. The time now is 05:13.