fds2ascii multi-slices

1,020 views
Skip to first unread message

Evangelos Tzanidis

unread,
Aug 4, 2014, 8:04:56 AM8/4/14
to fds...@googlegroups.com
Hello,
 
I am trying to export slicefile information in order to determine the tenable area in my simulations.
Specifically, I am trying to find out what percentage of the room has a temperature bellow 60C at head height (z=2.5m).
 
Unfortunately, this slice crosses 11 meshes and fds2ascii seems to only export the information of one mesh at a time.
Is there a way to simplify the process? I have to repeat it at least 20 times.
 
Best Regards,
Evangelos
 
 
 
 
 
 

Glenn Forney

unread,
Aug 4, 2014, 8:09:40 AM8/4/14
to fds...@googlegroups.com
slice files are stored then written out one mesh at a time which is why fds2ascii exports this way.  The slice file format (see FDS UG appendix) is not that complicated.  You could write a program to automate what you want to do .  I don't know of a simpler way of solving your problem


--
You received this message because you are subscribed to the Google Groups "FDS and Smokeview Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fds-smv+u...@googlegroups.com.
To post to this group, send email to fds...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fds-smv/4afa74c3-df81-4607-b82d-0b0dd0b1b461%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Glenn Forney

Kevin

unread,
Aug 4, 2014, 8:11:30 AM8/4/14
to fds...@googlegroups.com
I suggest you write a short script to do it. We have tried over the years to make fds2ascii more flexible, but each time someone comes up with an application not covered. In such circumstances, it is best to just write a script that repeats the basic process 20 times. You might find that over time, your script can become more flexible.

Evangelos Tzanidis

unread,
Aug 4, 2014, 10:48:03 AM8/4/14
to fds...@googlegroups.com
Thank you,
 
I wrote a script that runs fds2ascii multiple times, each time exporting the temperature slice file of a different mesh.
Now I will write a matlab script that will read the csv files, stitch them together and calculate the tenable area .
 
Best Regards,
Evangelos

Garrett Bornand

unread,
Sep 5, 2014, 3:26:21 PM9/5/14
to fds...@googlegroups.com
Hi Evangelos, 

Would you be willing to send me your script? I'm currently trying to do this. 

Thank you, 

Garrett

Evangelos Tzanidis

unread,
Sep 6, 2014, 1:06:01 PM9/6/14
to fds...@googlegroups.com
Hello Garrett,

I am doing post-processing on a mac, so I have written a .command script (just create it in text edit and change the extension), which runs in terminal and has a structure as follows:

fds2ascii << EOF
CHID
2
1
n
Starting_time_of_average
Ending_time_of_average
1
Index
Name_of_spreadsheet.csv
EOF

Replace CHID, Starting_time_of_average, Ending_time_of_average, Index and Name_of_spreadsheet.csv with your inputs.
You can just copy and paste the above lines multiple times in your script for different indices or timesteps.
You run the script in terminal by typing: ./script_name.command (while you are at the same directory)
(Remember to first make it executable by typing: chmod +x script_name.command)

If you are lazy like me, you can use a Matlab script that will generate the above script (I have attached mine but keep in mind that it is not very elegant)

Hope this helped,
Evan
create_batch.m

Garrett Bornand

unread,
Sep 6, 2014, 8:47:31 PM9/6/14
to fds...@googlegroups.com
Hi Evan, 

Thank you for your help! I really appreciate it! I made the .cmd file, but I can't get it to run on windows. Do you have any suggestions?

Garrett Bornand

unread,
Sep 6, 2014, 11:07:10 PM9/6/14
to fds...@googlegroups.com
Evan, 

Here is a picture of the .cmd file produced. It won't allow me to upload the actual file. 

I can now run the file, but the following error is given: 
"<< was unexpected at this time."
I've tried, but can't seemed to find a solution. 

Thank you, 

Garrett 

command file.JPG

Kristopher Overholt

unread,
Sep 6, 2014, 11:30:29 PM9/6/14
to fds...@googlegroups.com
You are trying to run something designed for Mac OS X on Windows, which will not work.

Windows/DOS provides scripting functionality via batch files (with the .bat extension), however batch files do not provide a way to send input directly to the fds2ascii program like the .command script file does. You'll need to find another way to do this.
--
You received this message because you are subscribed to the Google Groups "FDS and Smokeview Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fds-smv+u...@googlegroups.com.
To post to this group, send email to fds...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Kristopher J. Overholt
http://www.koverholt.com

dr_jfloyd

unread,
Sep 7, 2014, 10:31:14 AM9/7/14
to fds...@googlegroups.com
You can use a redirect with a text file containing the fds2ascii commands

fds2ascii <commands.txt

commands.txt (or whatever you wanted to call it) would contain the various fds2ascii commands needed to generate the output you want.   You can put the line in a batch file.


On Saturday, September 6, 2014 11:30:29 PM UTC-4, Kristopher Overholt wrote:
You are trying to run something designed for Mac OS X on Windows, which will not work.

Windows/DOS provides scripting functionality via batch files (with the .bat extension), however batch files do not provide a way to send input directly to the fds2ascii program like the .command script file does. You'll need to find another way to do this.

On Saturday, September 6, 2014, Garrett Bornand <garrett...@gmail.com> wrote:
Evan, 

Here is a picture of the .cmd file produced. It won't allow me to upload the actual file. 

I can now run the file, but the following error is given: 
"<< was unexpected at this time."
I've tried, but can't seemed to find a solution. 

Thank you, 

Garrett 

--
You received this message because you are subscribed to the Google Groups "FDS and Smokeview Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fds-smv+unsubscribe@googlegroups.com.

To post to this group, send email to fds...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fds-smv/8b04281f-e9e7-43ad-beb3-069f0fccf0a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Garrett Bornand

unread,
Sep 7, 2014, 4:22:57 PM9/7/14
to fds...@googlegroups.com
Thank you everyone for your help! I finally got it working correctly. 

fds-quang

unread,
Jun 12, 2016, 4:16:20 PM6/12/16
to FDS and Smokeview Discussions

Hello Garrett!

I'm trying to export result from multi slice files.

Would you mind giving me a hint  about how you use the batch file with fds2ascii command

Thanks in advance!
Reply all
Reply to author
Forward
0 new messages