forked from MaCFP/macfp-db
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FM_Burner: preliminary results NIST 2023
- Loading branch information
Showing
21 changed files
with
2,054 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
490 changes: 490 additions & 0 deletions
490
Extinction/FM_Burner/Computational_Results/2023/NIST/FM_Burner_cmp_config.csv
Large diffs are not rendered by default.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
Extinction/FM_Burner/Computational_Results/2023/NIST/FM_Burner_plot_cmp.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env python3 | ||
# McDermott | ||
# Feb 2021 | ||
|
||
# first, make sure the macfp module directory is in your path | ||
# if not, uncomment the lines below and replace <path to macfp-db> | ||
# with the path (absolute or relative) to your macfp-db repository | ||
|
||
import sys | ||
# sys.path.append('<path to macfp-db>/macfp-db/Utilities/') | ||
sys.path.append('../../../../../../macfp-db/Utilities/') | ||
|
||
import macfp | ||
import importlib | ||
importlib.reload(macfp) # use for development (while making changes to macfp.py) | ||
import matplotlib.pyplot as plt | ||
|
||
macfp.dataplot(config_filename='FM_Burner_cmp_config.csv', | ||
institute='NIST', | ||
revision='MaCFP-3, Tsukuba, 2023', | ||
expdir='../../../Experimental_Data/', | ||
cmpdir='./Preliminary/', | ||
pltdir='./Preliminary/Plots/', | ||
close_figs=True, | ||
verbose=True, | ||
plot_list=['all']) | ||
|
||
# plt.show() |
58 changes: 58 additions & 0 deletions
58
Extinction/FM_Burner/Computational_Results/2023/NIST/FM_Burner_post_process.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/usr/bin/env python3 | ||
# McDermott | ||
# 16 Aug 2023 | ||
# | ||
# Read and process FDS output files for FM_Burner cases to compute | ||
# Eta (combustion efficiency) and Chi_r (radiative fraction) | ||
|
||
import numpy as np | ||
import pandas as pd | ||
|
||
outdir = './Preliminary_Results/' | ||
|
||
# create files with XO2 as independent column | ||
|
||
fuel_name = ['C2H4','C3H6','C3H8','CH4'] | ||
res_name = ['2cm'] #,'1cm','5mm'] | ||
|
||
for fuel in fuel_name: | ||
for res in res_name: | ||
|
||
DEV = pd.read_csv(outdir+'FM_15cm_Burner_'+fuel+'_'+res+'_devc.csv', sep=',', header=1) | ||
HRR = pd.read_csv(outdir+'FM_15cm_Burner_'+fuel+'_'+res+'_hrr.csv', sep=',', header=1) | ||
|
||
XO2_FDS = DEV["XO2"].values[:].astype(float) | ||
Qdot_FDS = HRR["HRR"].values[:].astype(float) | ||
Qrad_FDS = HRR["Q_RADI"].values[:].astype(float) | ||
|
||
ETA = Qdot_FDS/np.max(Qdot_FDS) | ||
CHI_R = np.minimum(1.,np.maximum(0.,-Qrad_FDS)/np.maximum(0.001,Qdot_FDS)) | ||
|
||
df = pd.DataFrame({'XO2': XO2_FDS[1:], | ||
'eta': ETA[1:], | ||
'Chi_R': CHI_R[1:]}) | ||
|
||
df.to_csv(outdir+'FM_15cm_Burner_'+fuel+'_'+res+'.csv',index=False,float_format='%5.3f') | ||
|
||
# create files with Time as independent column for C2H4 fuel | ||
|
||
O2_name = ['20p9','19p0','16p8','15p2'] | ||
res_name = ['2cm'] #,'1cm','5mm'] | ||
|
||
for O2 in O2_name: | ||
for res in res_name: | ||
|
||
HRR = pd.read_csv(outdir+'FM_15cm_Burner_C2H4_'+O2+'_'+res+'_hrr.csv', sep=',', header=1); | ||
|
||
Time_FDS = HRR["Time"].values[:].astype(float) | ||
Qdot_FDS = HRR["HRR"].values[:].astype(float) | ||
Qrad_FDS = HRR["Q_RADI"].values[:].astype(float) | ||
|
||
CHI_R = np.minimum(1.,np.maximum(0.,-Qrad_FDS)/np.maximum(0.001,Qdot_FDS)) | ||
|
||
df = pd.DataFrame({'Time': Time_FDS[1:], | ||
'Chi_r': CHI_R[1:]}) | ||
|
||
df.to_csv(outdir+'FM_15cm_Burner_C2H4_'+O2+'_'+res+'_chir.csv',index=False,float_format='%5.3f') | ||
|
||
|
Oops, something went wrong.