Adding a new parameter to cfast? #2099
-
Hi all, I am experimenting with adding a new parameter to cfast such that a user can specify it and use it in the simulation but I am still a beginner and finding it difficult to navigate the source files. For example, I would like to add 'thermal inertia' as a new parameter that the user can specify as an input (just like how they would specify density of a material). How do I go about doing that and how do I link this parameter to the .in file so that when the user specifies it, it will be called by cfast and used in the simulation. I plan to run cfast using command prompt. I am aware that the thermal inertia is the product of density, specific heat and thermal conductivity, but I am using it as an example. Thank you in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I suggest you trace an existing input parameter from where it is read to where it is used. Then you would follow this example with the new parameter. There are no notes on the source code that I know of, so you would just have to figure it out. That is how most people work with FDS. Locate the main read and initialization routines. A good text editor or tool like MS Visual Studio can help trace a particular character string. |
Beta Was this translation helpful? Give feedback.
-
I would add that I would start with looking at the aspect of CFAST that you want to change, find variables that are user inputs, pick one and then go to the input and find that input is read in the input file find that in the code in file input_namelist.f90. Say you want to change something for a material, as you suggested, you would go to read_matl and track the variable through in CFAST. You probably want to group your variable you are adding with similar variables in CFAST. Good luck. |
Beta Was this translation helpful? Give feedback.
-
Thank you @mcgratta and @preneke! I have done that and managed to add the parameter. |
Beta Was this translation helpful? Give feedback.
I suggest you trace an existing input parameter from where it is read to where it is used. Then you would follow this example with the new parameter. There are no notes on the source code that I know of, so you would just have to figure it out. That is how most people work with FDS. Locate the main read and initialization routines. A good text editor or tool like MS Visual Studio can help trace a particular character string.