-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #448 from rmcdermo/master
NIST Pool Fires: add NIST puffing frequency results
- Loading branch information
Showing
7 changed files
with
332 additions
and
2 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
77 changes: 77 additions & 0 deletions
77
..._Pool_Fires/Computational_Results/2023/NIST/NIST_Pool_Fires_1m_methanol_power_spectrum.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,77 @@ | ||
# McDermott | ||
# 25 March 2021 | ||
# power_spectrum.py | ||
|
||
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) | ||
import matplotlib.pyplot as plt | ||
from scipy import signal | ||
import pandas as pd | ||
import numpy as np | ||
|
||
# get the model results | ||
M1 = pd.read_csv('./Output/NIST_Methanol_1m_GEOM_Predicted_10cm_cat_devc.csv', header=1, sep=' *, *', engine='python') | ||
M2 = pd.read_csv('./Output/NIST_Methanol_1m_GEOM_Predicted_5cm_cat_devc.csv', header=1, sep=' *, *', engine='python') | ||
M3 = pd.read_csv('./Output/NIST_Methanol_1m_GEOM_Predicted_2p5cm_cat_devc.csv', header=1, sep=' *, *', engine='python') | ||
|
||
fs1 = len(M1['Time'])/max(M1['Time']) | ||
fs2 = len(M2['Time'])/max(M2['Time']) | ||
fs3 = len(M3['Time'])/max(M3['Time']) | ||
|
||
x1 = M1['"w"'][M1['Time']>30.] | ||
x2 = M2['"w"'][M2['Time']>30.] | ||
x3 = M3['"w"'][M3['Time']>30.] | ||
|
||
f1, Pxx_den_1 = signal.periodogram(x1, fs1) | ||
f2, Pxx_den_2 = signal.periodogram(x2, fs2) | ||
f3, Pxx_den_3 = signal.periodogram(x3, fs3) | ||
|
||
# plot experimental result | ||
|
||
fpuff = 1.37 | ||
funce = 0.0 | ||
fmeas = np.array([fpuff, fpuff]) | ||
PSDmeas = np.array([0., 2.]) | ||
fh=macfp.plot_to_fig(fmeas, PSDmeas, | ||
plot_type='linear', | ||
x_min=0.5,x_max=4,y_min=0,y_max=15, | ||
x_label='frequency [Hz]', | ||
y_label='PSD [V**2/Hz]', | ||
line_style='--', | ||
line_width=2, | ||
line_color='black', | ||
institute_label='NIST predicted MLR', | ||
revision_label='MaCFP-3, Tsukuba, Japan', | ||
data_label='Exp', | ||
plot_title='NIST 1 m Methanol Puffing Frequency', | ||
show_legend=True, | ||
legend_location='right') | ||
|
||
# add error to measuered puffing freq | ||
plt.fill_betweenx(PSDmeas, np.array([fpuff-funce, fpuff-funce]), np.array([fpuff+funce, fpuff+funce]), color='lightgrey', figure=fh) | ||
|
||
fh=macfp.plot_to_fig(f1, Pxx_den_1, plot_type='linear',x_min=0.5,x_max=4,y_min=0,y_max=2.5,x_label='frequency [Hz]',y_label='PSD [V**2/Hz]',data_label='FDS $\Delta x=10$ cm', line_style='-', line_width=1,line_color='black', marker_style='o',marker_size=4,marker_edge_color='black', marker_fill_color='None',figure_handle=fh,show_legend=True,legend_location='right') | ||
fh=macfp.plot_to_fig(f2, Pxx_den_2, plot_type='linear',x_min=0.5,x_max=4,y_min=0,y_max=2.5,x_label='frequency [Hz]',y_label='PSD [V**2/Hz]',data_label='FDS $\Delta x=5$ cm', line_style='-', line_width=1,line_color='magenta',marker_style='^',marker_size=4,marker_edge_color='magenta',marker_fill_color='None',figure_handle=fh,show_legend=True,legend_location='right') | ||
fh=macfp.plot_to_fig(f3, Pxx_den_3, plot_type='linear',x_min=0.5,x_max=4,y_min=0,y_max=2.5,x_label='frequency [Hz]',y_label='PSD [V**2/Hz]',data_label='FDS $\Delta x=2.5$ cm', line_style='-.',line_width=1,line_color='red',marker_style='s',marker_size=4,marker_edge_color='red', marker_fill_color='None',figure_handle=fh,show_legend=True,legend_location='right') | ||
|
||
print(f3[np.where(Pxx_den_3==Pxx_den_3.max())]) | ||
|
||
# plt.show() | ||
|
||
plt.savefig('./Plots/NIST_1m_Methanol_puffing_frequency.pdf') | ||
|
||
# loglog spectrum | ||
fh2=macfp.plot_to_fig(f3, Pxx_den_3, plot_type='loglog',x_min=0.5,x_max=1000,y_min=.00001,y_max=100,x_label='frequency [Hz]',y_label='PSD [V**2/Hz]',plot_title='NIST 1 m Methanol Power Spectrum',data_label='FDS $\Delta x=2.5$ cm',line_style='-', line_width=1,line_color='black',show_legend=True,legend_location='center right',legend_framealpha=1.,institute_label='NIST predicted MLR') | ||
macfp.plot_to_fig(f3, f3**(-5./3.),plot_type='loglog',x_min=0.5,x_max=1000,y_min=.00001,y_max=100,x_label='frequency [Hz]',y_label='PSD [V**2/Hz]',data_label='f**-5/3',line_style='--', line_width=2,line_color='black',show_legend=True,legend_location='center right',legend_framealpha=1.,figure_handle=fh2) | ||
fnyquist = np.array([0.5*fs3, 0.5*fs3]) | ||
macfp.plot_to_fig(fnyquist, PSDmeas,plot_type='loglog',x_min=0.5,x_max=1000,y_min=.00001,y_max=100,x_label='frequency [Hz]',y_label='PSD [V**2/Hz]',data_label='f Nyquist',line_style='--', line_width=1,line_color='red',show_legend=True,legend_location='center right',legend_framealpha=1.,figure_handle=fh2) | ||
macfp.plot_to_fig(fmeas, PSDmeas,plot_type='loglog',x_min=0.5,x_max=1000,y_min=.00001,y_max=100,x_label='frequency [Hz]',y_label='PSD [V**2/Hz]',data_label='f puffing',line_style='--', line_width=1,line_color='green',show_legend=True,legend_location='center right',legend_framealpha=1.,figure_handle=fh2) | ||
|
||
# plt.show() | ||
|
||
plt.savefig('./Plots/NIST_1m_Methanol_Power_Spectrum.pdf') |
82 changes: 82 additions & 0 deletions
82
...ool_Fires/Computational_Results/2023/NIST/NIST_Pool_Fires_30cm_methanol_power_spectrum.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,82 @@ | ||
# McDermott | ||
# 25 March 2021 | ||
# power_spectrum.py | ||
|
||
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) | ||
import matplotlib.pyplot as plt | ||
from scipy import signal | ||
import pandas as pd | ||
import numpy as np | ||
|
||
# get the model results | ||
M1 = pd.read_csv('./Output/NIST_Methanol_GEOM_Predicted_4cm_cat_devc.csv', header=1, sep=' *, *', engine='python') | ||
M2 = pd.read_csv('./Output/NIST_Methanol_GEOM_Predicted_2cm_cat_devc.csv', header=1, sep=' *, *', engine='python') | ||
M3 = pd.read_csv('./Output/NIST_Methanol_GEOM_Predicted_1cm_cat_devc.csv', header=1, sep=' *, *', engine='python') | ||
M4 = pd.read_csv('./Output/NIST_Methanol_GEOM_Predicted_p5cm_cat_devc.csv', header=1, sep=' *, *', engine='python') | ||
|
||
fs1 = len(M1['Time'])/max(M1['Time']) | ||
fs2 = len(M2['Time'])/max(M2['Time']) | ||
fs3 = len(M3['Time'])/max(M3['Time']) | ||
fs4 = len(M4['Time'])/max(M4['Time']) | ||
|
||
x1 = M1['"w"'][M1['Time']>30.] | ||
x2 = M2['"w"'][M2['Time']>30.] | ||
x3 = M3['"w"'][M3['Time']>30.] | ||
x4 = M4['"w"'][M4['Time']>30.] | ||
|
||
f1, Pxx_den_1 = signal.periodogram(x1, fs1) | ||
f2, Pxx_den_2 = signal.periodogram(x2, fs2) | ||
f3, Pxx_den_3 = signal.periodogram(x3, fs3) | ||
f4, Pxx_den_4 = signal.periodogram(x4, fs4) | ||
|
||
# plot experimental result | ||
|
||
fpuff = 2.64 | ||
funce = 0.06 | ||
fmeas = np.array([fpuff, fpuff]) | ||
PSDmeas = np.array([0., .75]) | ||
fh=macfp.plot_to_fig(fmeas, PSDmeas, | ||
plot_type='linear', | ||
x_min=0.5,x_max=4,y_min=0,y_max=15, | ||
x_label='frequency [Hz]', | ||
y_label='PSD [V**2/Hz]', | ||
line_style='--', | ||
line_width=2, | ||
line_color='black', | ||
institute_label='NIST predicted MLR', | ||
revision_label='MaCFP-3, Tsukuba, Japan', | ||
data_label='Exp', | ||
plot_title='NIST 30 cm Methanol Puffing Frequency', | ||
show_legend=True, | ||
legend_location='right') | ||
|
||
# add error to measuered puffing freq | ||
plt.fill_betweenx(PSDmeas, np.array([fpuff-funce, fpuff-funce]), np.array([fpuff+funce, fpuff+funce]), color='lightgrey', figure=fh) | ||
|
||
fh=macfp.plot_to_fig(f1, Pxx_den_1, plot_type='linear',x_min=0.5,x_max=4,y_min=0,y_max=1,x_label='frequency [Hz]',y_label='PSD [V**2/Hz]',data_label='FDS $\Delta x=4$ cm', line_style='-', line_width=1,line_color='black', marker_style='o',marker_size=4,marker_edge_color='black', marker_fill_color='None',figure_handle=fh,show_legend=True,legend_location='center left') | ||
fh=macfp.plot_to_fig(f2, Pxx_den_2, plot_type='linear',x_min=0.5,x_max=4,y_min=0,y_max=1,x_label='frequency [Hz]',y_label='PSD [V**2/Hz]',data_label='FDS $\Delta x=2$ cm', line_style='-', line_width=1,line_color='magenta',marker_style='^',marker_size=4,marker_edge_color='magenta',marker_fill_color='None',figure_handle=fh,show_legend=True,legend_location='center left') | ||
fh=macfp.plot_to_fig(f3, Pxx_den_3, plot_type='linear',x_min=0.5,x_max=4,y_min=0,y_max=1,x_label='frequency [Hz]',y_label='PSD [V**2/Hz]',data_label='FDS $\Delta x=1$ cm', line_style='-.',line_width=1,line_color='red',marker_style='s',marker_size=4,marker_edge_color='red', marker_fill_color='None',figure_handle=fh,show_legend=True,legend_location='center left') | ||
fh=macfp.plot_to_fig(f4, Pxx_den_4, plot_type='linear',x_min=0.5,x_max=4,y_min=0,y_max=1,x_label='frequency [Hz]',y_label='PSD [V**2/Hz]',data_label='FDS $\Delta x=0.5$ cm', line_style='-.',line_width=1,line_color='blue',marker_style='>',marker_size=4,marker_edge_color='blue', marker_fill_color='None',figure_handle=fh,show_legend=True,legend_location='center left') | ||
|
||
print(f4[np.where(Pxx_den_4==Pxx_den_4.max())]) | ||
|
||
# plt.show() | ||
|
||
plt.savefig('./Plots/NIST_30cm_Methanol_puffing_frequency.pdf') | ||
|
||
# loglog spectrum | ||
fh2=macfp.plot_to_fig(f4, Pxx_den_4, plot_type='loglog',x_min=0.5,x_max=1000,y_min=.00001,y_max=100,x_label='frequency [Hz]',y_label='PSD [V**2/Hz]',plot_title='NIST 30 cm Methanol Power Spectrum',data_label='FDS $\Delta x=0.5$ cm',line_style='-', line_width=1,line_color='black',show_legend=True,legend_location='center right',legend_framealpha=1.,institute_label='NIST predicted MLR') | ||
macfp.plot_to_fig(f4, f4**(-5./3.),plot_type='loglog',x_min=0.5,x_max=1000,y_min=.00001,y_max=100,x_label='frequency [Hz]',y_label='PSD [V**2/Hz]',data_label='f**-5/3',line_style='--', line_width=2,line_color='black',show_legend=True,legend_location='center right',legend_framealpha=1.,figure_handle=fh2) | ||
fnyquist = np.array([0.5*fs4, 0.5*fs4]) | ||
macfp.plot_to_fig(fnyquist, PSDmeas,plot_type='loglog',x_min=0.5,x_max=1000,y_min=.00001,y_max=100,x_label='frequency [Hz]',y_label='PSD [V**2/Hz]',data_label='f Nyquist',line_style='--', line_width=1,line_color='red',show_legend=True,legend_location='center right',legend_framealpha=1.,figure_handle=fh2) | ||
macfp.plot_to_fig(fmeas, PSDmeas,plot_type='loglog',x_min=0.5,x_max=1000,y_min=.00001,y_max=100,x_label='frequency [Hz]',y_label='PSD [V**2/Hz]',data_label='f puffing',line_style='--', line_width=1,line_color='green',show_legend=True,legend_location='center right',legend_framealpha=1.,figure_handle=fh2) | ||
|
||
# plt.show() | ||
|
||
plt.savefig('./Plots/NIST_30cm_Methanol_Power_Spectrum.pdf') |
76 changes: 76 additions & 0 deletions
76
...Fires/Computational_Results/2023/NIST/NIST_Pool_Fires_37cm_20kW_propane_power_spectrum.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,76 @@ | ||
# McDermott | ||
# 25 March 2021 | ||
# power_spectrum.py | ||
|
||
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) | ||
import matplotlib.pyplot as plt | ||
from scipy import signal | ||
import pandas as pd | ||
import numpy as np | ||
|
||
# get the model results | ||
M1 = pd.read_csv('./Output/NIST_Propane_20kW_GEOM_Prescribed_4cm_cat_devc.csv', header=1, sep=' *, *', engine='python') | ||
M2 = pd.read_csv('./Output/NIST_Propane_20kW_GEOM_Prescribed_2cm_cat_devc.csv', header=1, sep=' *, *', engine='python') | ||
M3 = pd.read_csv('./Output/NIST_Propane_20kW_GEOM_Prescribed_1cm_cat_devc.csv', header=1, sep=' *, *', engine='python') | ||
|
||
fs1 = len(M1['Time'])/max(M1['Time']) | ||
fs2 = len(M2['Time'])/max(M2['Time']) | ||
fs3 = len(M3['Time'])/max(M3['Time']) | ||
|
||
x1 = M1['"w"'][M1['Time']>30.] | ||
x2 = M2['"w"'][M2['Time']>30.] | ||
x3 = M3['"w"'][M3['Time']>30.] | ||
|
||
f1, Pxx_den_1 = signal.periodogram(x1, fs1) | ||
f2, Pxx_den_2 = signal.periodogram(x2, fs2) | ||
f3, Pxx_den_3 = signal.periodogram(x3, fs3) | ||
|
||
# plot experimental result | ||
fpuff = 2.31 | ||
funce = 0.10 | ||
fmeas = np.array([fpuff, fpuff]) | ||
PSDmeas = np.array([0., 5.]) | ||
fh=macfp.plot_to_fig(fmeas, PSDmeas, | ||
plot_type='linear', | ||
x_min=0.5,x_max=4,y_min=0,y_max=15, | ||
x_label='frequency [Hz]', | ||
y_label='PSD [V**2/Hz]', | ||
line_style='--', | ||
line_width=2, | ||
line_color='black', | ||
institute_label='NIST', | ||
revision_label='MaCFP-3, Tsukuba, Japan', | ||
data_label='Exp', | ||
plot_title='NIST 37 cm 20 kW Propane Puffing Frequency', | ||
show_legend=True, | ||
legend_location='right') | ||
|
||
# add error to measuered puffing freq | ||
plt.fill_betweenx(PSDmeas, np.array([fpuff-funce, fpuff-funce]), np.array([fpuff+funce, fpuff+funce]), color='lightgrey', figure=fh) | ||
|
||
fh=macfp.plot_to_fig(f1, Pxx_den_1, plot_type='linear',x_min=0.5,x_max=4,y_min=0,y_max=6,x_label='frequency [Hz]',y_label='PSD [V**2/Hz]',data_label='FDS $\Delta x=4$ cm', line_style='-', line_width=1,line_color='black', marker_style='o',marker_size=4,marker_edge_color='black', marker_fill_color='None',figure_handle=fh,show_legend=True,legend_location='center left') | ||
fh=macfp.plot_to_fig(f2, Pxx_den_2, plot_type='linear',x_min=0.5,x_max=4,y_min=0,y_max=6,x_label='frequency [Hz]',y_label='PSD [V**2/Hz]',data_label='FDS $\Delta x=2$ cm', line_style='-', line_width=1,line_color='magenta',marker_style='^',marker_size=4,marker_edge_color='magenta',marker_fill_color='None',figure_handle=fh,show_legend=True,legend_location='center left') | ||
fh=macfp.plot_to_fig(f3, Pxx_den_3, plot_type='linear',x_min=0.5,x_max=4,y_min=0,y_max=6,x_label='frequency [Hz]',y_label='PSD [V**2/Hz]',data_label='FDS $\Delta x=1$ cm', line_style='-.',line_width=1,line_color='red',marker_style='s',marker_size=4,marker_edge_color='red', marker_fill_color='None',figure_handle=fh,show_legend=True,legend_location='center left') | ||
|
||
print(f3[np.where(Pxx_den_3==Pxx_den_3.max())]) | ||
|
||
# plt.show() | ||
|
||
plt.savefig('./Plots/NIST_37cm_20kW_Propane_puffing_frequency.pdf') | ||
|
||
# loglog spectrum | ||
fh2=macfp.plot_to_fig(f3, Pxx_den_3, plot_type='loglog',x_min=0.5,x_max=1000,y_min=.00001,y_max=100,x_label='frequency [Hz]',y_label='PSD [V**2/Hz]',plot_title='NIST 37 cm 20 kW Propane Power Spectrum',data_label='FDS $\Delta x=1$ cm',line_style='-', line_width=1,line_color='black',show_legend=True,legend_location='center right',legend_framealpha=1.,institute_label='NIST') | ||
macfp.plot_to_fig(f3, f3**(-5./3.),plot_type='loglog',x_min=0.5,x_max=1000,y_min=.00001,y_max=100,x_label='frequency [Hz]',y_label='PSD [V**2/Hz]',data_label='f**-5/3',line_style='--', line_width=2,line_color='black',show_legend=True,legend_location='center right',legend_framealpha=1.,figure_handle=fh2) | ||
fnyquist = np.array([0.5*fs3, 0.5*fs3]) | ||
macfp.plot_to_fig(fnyquist, PSDmeas,plot_type='loglog',x_min=0.5,x_max=1000,y_min=.00001,y_max=100,x_label='frequency [Hz]',y_label='PSD [V**2/Hz]',data_label='f Nyquist',line_style='--', line_width=1,line_color='red',show_legend=True,legend_location='center right',legend_framealpha=1.,figure_handle=fh2) | ||
macfp.plot_to_fig(fmeas, PSDmeas,plot_type='loglog',x_min=0.5,x_max=1000,y_min=.00001,y_max=100,x_label='frequency [Hz]',y_label='PSD [V**2/Hz]',data_label='f puffing',line_style='--', line_width=1,line_color='green',show_legend=True,legend_location='center right',legend_framealpha=1.,figure_handle=fh2) | ||
|
||
# plt.show() | ||
|
||
plt.savefig('./Plots/NIST_37cm_20kW_Propane_Power_Spectrum.pdf') |
76 changes: 76 additions & 0 deletions
76
...Fires/Computational_Results/2023/NIST/NIST_Pool_Fires_37cm_34kW_propane_power_spectrum.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,76 @@ | ||
# McDermott | ||
# 25 March 2021 | ||
# power_spectrum.py | ||
|
||
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) | ||
import matplotlib.pyplot as plt | ||
from scipy import signal | ||
import pandas as pd | ||
import numpy as np | ||
|
||
# get the model results | ||
M1 = pd.read_csv('./Output/NIST_Propane_34kW_GEOM_Prescribed_2cm_cat_devc.csv', header=1, sep=' *, *', engine='python') | ||
M2 = pd.read_csv('./Output/NIST_Propane_34kW_GEOM_Prescribed_1cm_cat_devc.csv', header=1, sep=' *, *', engine='python') | ||
M3 = pd.read_csv('./Output/NIST_Propane_34kW_GEOM_Prescribed_p5cm_cat_devc.csv', header=1, sep=' *, *', engine='python') | ||
|
||
fs1 = len(M1['Time'])/max(M1['Time']) | ||
fs2 = len(M2['Time'])/max(M2['Time']) | ||
fs3 = len(M3['Time'])/max(M3['Time']) | ||
|
||
x1 = M1['"w"'][M1['Time']>30.] | ||
x2 = M2['"w"'][M2['Time']>30.] | ||
x3 = M3['"w"'][M3['Time']>30.] | ||
|
||
f1, Pxx_den_1 = signal.periodogram(x1, fs1) | ||
f2, Pxx_den_2 = signal.periodogram(x2, fs2) | ||
f3, Pxx_den_3 = signal.periodogram(x3, fs3) | ||
|
||
# plot experimental result | ||
fpuff = 2.31 | ||
funce = 0.10 | ||
fmeas = np.array([fpuff, fpuff]) | ||
PSDmeas = np.array([0., 1.5]) | ||
fh=macfp.plot_to_fig(fmeas, PSDmeas, | ||
plot_type='linear', | ||
x_min=0.5,x_max=4,y_min=0,y_max=15, | ||
x_label='frequency [Hz]', | ||
y_label='PSD [V**2/Hz]', | ||
line_style='--', | ||
line_width=2, | ||
line_color='black', | ||
institute_label='NIST', | ||
revision_label='MaCFP-3, Tsukuba, Japan', | ||
data_label='Exp', | ||
plot_title='NIST 37 cm 34 kW Propane Puffing Frequency', | ||
show_legend=True, | ||
legend_location='right') | ||
|
||
# add error to measuered puffing freq | ||
plt.fill_betweenx(PSDmeas, np.array([fpuff-funce, fpuff-funce]), np.array([fpuff+funce, fpuff+funce]), color='lightgrey', figure=fh) | ||
|
||
fh=macfp.plot_to_fig(f1, Pxx_den_1, plot_type='linear',x_min=0.5,x_max=4,y_min=0,y_max=2,x_label='frequency [Hz]',y_label='PSD [V**2/Hz]',data_label='FDS $\Delta x=2$ cm', line_style='-', line_width=1,line_color='black', marker_style='o',marker_size=4,marker_edge_color='black', marker_fill_color='None',figure_handle=fh,show_legend=True,legend_location='center left') | ||
fh=macfp.plot_to_fig(f2, Pxx_den_2, plot_type='linear',x_min=0.5,x_max=4,y_min=0,y_max=2,x_label='frequency [Hz]',y_label='PSD [V**2/Hz]',data_label='FDS $\Delta x=1$ cm', line_style='-', line_width=1,line_color='magenta',marker_style='^',marker_size=4,marker_edge_color='magenta',marker_fill_color='None',figure_handle=fh,show_legend=True,legend_location='center left') | ||
fh=macfp.plot_to_fig(f3, Pxx_den_3, plot_type='linear',x_min=0.5,x_max=4,y_min=0,y_max=2,x_label='frequency [Hz]',y_label='PSD [V**2/Hz]',data_label='FDS $\Delta x=0.5$ cm', line_style='-.',line_width=1,line_color='red',marker_style='s',marker_size=4,marker_edge_color='red', marker_fill_color='None',figure_handle=fh,show_legend=True,legend_location='center left') | ||
|
||
print(f3[np.where(Pxx_den_3==Pxx_den_3.max())]) | ||
|
||
# plt.show() | ||
|
||
plt.savefig('./Plots/NIST_37cm_34kW_Propane_puffing_frequency.pdf') | ||
|
||
# loglog spectrum | ||
fh2=macfp.plot_to_fig(f3, Pxx_den_3, plot_type='loglog',x_min=0.5,x_max=1000,y_min=.00001,y_max=100,x_label='frequency [Hz]',y_label='PSD [V**2/Hz]',plot_title='NIST 37 cm 34 kW Propane Power Spectrum',data_label='FDS $\Delta x=0.5$ cm',line_style='-', line_width=1,line_color='black',show_legend=True,legend_location='center right',legend_framealpha=1.,institute_label='NIST') | ||
macfp.plot_to_fig(f3, f3**(-5./3.),plot_type='loglog',x_min=0.5,x_max=1000,y_min=.00001,y_max=100,x_label='frequency [Hz]',y_label='PSD [V**2/Hz]',data_label='f**-5/3',line_style='--', line_width=2,line_color='black',show_legend=True,legend_location='center right',legend_framealpha=1.,figure_handle=fh2) | ||
fnyquist = np.array([0.5*fs3, 0.5*fs3]) | ||
macfp.plot_to_fig(fnyquist, PSDmeas,plot_type='loglog',x_min=0.5,x_max=1000,y_min=.00001,y_max=100,x_label='frequency [Hz]',y_label='PSD [V**2/Hz]',data_label='f Nyquist',line_style='--', line_width=1,line_color='red',show_legend=True,legend_location='center right',legend_framealpha=1.,figure_handle=fh2) | ||
macfp.plot_to_fig(fmeas, PSDmeas,plot_type='loglog',x_min=0.5,x_max=1000,y_min=.00001,y_max=100,x_label='frequency [Hz]',y_label='PSD [V**2/Hz]',data_label='f puffing',line_style='--', line_width=1,line_color='green',show_legend=True,legend_location='center right',legend_framealpha=1.,figure_handle=fh2) | ||
|
||
# plt.show() | ||
|
||
plt.savefig('./Plots/NIST_37cm_34kW_Propane_Power_Spectrum.pdf') |
Oops, something went wrong.