Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 51 additions & 1 deletion Common/DataDrivenConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,8 @@ class Config_FGM(Config):
__generate_extra_interpolated_burnerflames:bool = True # Generate extra interpolated burner-stabilized flamelets
__generate_equilibrium:bool = DefaultSettings_FGM.include_equilibrium # Generate chemical equilibrium data
__generate_counterflames:bool = DefaultSettings_FGM.include_counterflames # Generate counter-flow diffusion flamelets.
__counterflow_fixed_strain:bool = DefaultSettings_FGM.counterflow_fixed_strain # Fixed-strain mode for counterflow flames.
__counterflow_strain_rate:float = DefaultSettings_FGM.counterflow_strain_rate # Global strain rate [1/s] for fixed-strain mode.

__write_MATLAB_files:bool = False # Write TableGenerator compatible flamelet files.

Expand Down Expand Up @@ -962,7 +964,10 @@ def PrintBanner(self):
if self.__generate_equilibrium:
print("-Chemical equilibrium data")
if self.__generate_counterflames:
print("-Counter-flow diffusion flamelet data")
if self.__counterflow_fixed_strain:
print("-Counter-flow diffusion flamelet data (fixed strain rate: %.1f 1/s)" % self.__counterflow_strain_rate)
else:
print("-Counter-flow diffusion flamelet data (ramp to extinction)")
print("")

print("Flamelet manifold data characteristics: ")
Expand Down Expand Up @@ -1580,6 +1585,51 @@ def GenerateCounterFlames(self):
"""
return self.__generate_counterflames

def SetCounterFlowFixedStrain(self, fixed:bool=True):
"""
Select fixed-strain-rate mode for counter-flow diffusion flames.

When True, one flame is solved per temperature level at the strain rate
set by SetCounterFlowStrainRate. When False (default), the existing
ramp-to-extinction behaviour is used.

:param fixed: enable fixed-strain mode.
:type fixed: bool
"""
self.__counterflow_fixed_strain = fixed
return

def GetCounterFlowFixedStrain(self) -> bool:
"""
Whether fixed-strain mode is enabled for counter-flow flames.

:return: fixed-strain mode is active.
:rtype: bool
"""
return self.__counterflow_fixed_strain

def SetCounterFlowStrainRate(self, strain_rate:float):
"""
Set the global strain rate used in fixed-strain counter-flow flame mode.

:param strain_rate: global strain rate in 1/s.
:type strain_rate: float
:raises Exception: if strain_rate is not strictly positive.
"""
if strain_rate <= 0:
raise Exception("Counter-flow strain rate must be strictly positive.")
self.__counterflow_strain_rate = strain_rate
return

def GetCounterFlowStrainRate(self) -> float:
"""
Return the global strain rate used in fixed-strain counter-flow flame mode.

:return: global strain rate [1/s].
:rtype: float
"""
return self.__counterflow_strain_rate

def GenerateExtraInterpolatedBurnerFlames(self):
"""
Whether the manifold data contains extra interpolated burner-stabilized flame data.
Expand Down
3 changes: 3 additions & 0 deletions Common/Properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ class DefaultSettings_FGM(DefaultProperties):
include_equilibrium:bool = True
include_counterflames:bool = False

counterflow_fixed_strain:bool = False # False = ramp-to-extinction; True = fixed strain rate
counterflow_strain_rate:float = 56.0 # global strain rate [1/s] for fixed-strain mode

affinity_threshold:float = 0.7
output_file_header:str = "flamelet_data"
boundary_file_header:str = "boundary_data"
Expand Down
223 changes: 194 additions & 29 deletions Data_Generation/DataGenerator_FGM.py

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions Data_Processing/collectFlameletData.py
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,8 @@ def __SizeDataArrays(self):
# Count the number of counter-flow diffusion flamelets.
if self.__include_counterflame:
print("Counting counter-flow diffusion flame data...")
counterflame_files = listdir(self.__flameletdata_dir + "/counterflame_data")
counterflame_files = [f for f in listdir(self.__flameletdata_dir + "/counterflame_data")
if f.endswith('.csv')]
n_counterflames += len(counterflame_files)
for f in counterflame_files:
with open(self.__flameletdata_dir + "/counterflame_data/" + f, 'r') as fid:
Expand Down Expand Up @@ -646,7 +647,7 @@ def __SizeDataArrays(self):

def __InterpolateFlameletData(self, flamelet_dir:str, eq_file:str, i_start:int, i_flamelet_total:int, is_fuzzy:bool=False, is_equilibrium:bool=False):

flamelets = listdir(flamelet_dir + "/" + eq_file)
flamelets = [f for f in listdir(flamelet_dir + "/" + eq_file) if f.endswith('.csv')]
for i_flamelet, f in enumerate(flamelets):
BurningFlamelet:bool = True

Expand Down
Loading
Loading