Skip to content

Commit

Permalink
Merge pull request #427 from fbraennstroem/master
Browse files Browse the repository at this point in the history
UWuppertal - FM Burner
  • Loading branch information
rmcdermo committed Sep 5, 2023
2 parents c0ba1b3 + b218548 commit 33de641
Show file tree
Hide file tree
Showing 76 changed files with 22,811 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/Extinction.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,23 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Step 1: generate the plots
- name: UWuppertal Results
run: |
echo $GITHUB_WORKSPACE
cd $GITHUB_WORKSPACE/Extinction/FM_Burner/Computational_Results/2023/UWuppertal
python FM_Burner_plot_cmp.py
# Step 2: push the plots to the releases page
- name: Push UWuppertal Results to release
if: ( github.event_name == 'push' || github.event_name == 'workflow_dispatch' ) && github.repository_owner == 'MaCFP'
run: |
cd $GITHUB_WORKSPACE/Extinction/FM_Burner/Computational_Results/2023/UWuppertal
cp README.md ./Plots/.
zip Plots.zip -r Plots
mv Plots.zip FM_Burner_UWuppertal_Plots.zip
gh release upload SCRIPT_FIGURES FM_Burner_UWuppertal_Plots.zip --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/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/')
# sys.path.append('/Users/fbraenns/09_TOOLs_Application/MaCFP/00_Repositories/macfp-db_FORK.github/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='UWuppertal',
revision='MaCFP-3, Tsukuba, 2023',
expdir='../../../Experimental_Data/',
# cmpdir='./Output/',
# cmpdir='../NIST/Output/',
cmpdir='./Output/',
pltdir='./Plots/',
close_figs=True,
verbose=True,
plot_list=['all'])

# plt.show()
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#!/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 = './Output/'

# create files with XO2 as independent column

fuel_name = ['C2H4','C3H6','C3H8','CH4']
fuel_name = ['C2H4']
res_name = ['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']
O2_name = ['20p9']
res_name = ['5mm']

variantL = ["v1_","v2_", "v3_","v4_","v5_","v6_","v7_","v8_","v9_","v10_"]
for variant in variantL:
for O2 in O2_name:
for res in res_name:

HRR = pd.read_csv(outdir+ variant+'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+variant+'FM_15cm_Burner_C2H4_'+O2+'_'+res+'_chir.csv',index=False,float_format='%5.3f')


Loading

0 comments on commit 33de641

Please sign in to comment.