Skip to content

Commit 4a299d7

Browse files
fix whitespaces
1 parent cd5cee7 commit 4a299d7

28 files changed

Lines changed: 98 additions & 98 deletions

Common/DataDrivenConfig.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,7 +1263,7 @@ def SetNpMix(self, input:int=DefaultSettings_FGM.Np_eq):
12631263
"""
12641264
Set number of divisions between lean and rich mixture status for flamelet generation.
12651265
1266-
:param input: Number of divisions between leanest and richest pre-mixed solution.
1266+
:param input: Number of divisions between leanest and richest pre-mixed solution.
12671267
:type input: int
12681268
:raise: Exception: If the number of divisions is lower than one.
12691269
@@ -1509,7 +1509,7 @@ def GetProgressVariableWeights(self):
15091509
return self.__pv_weights
15101510

15111511
def SetDefaultProgressVariable(self):
1512-
"""Set progress variable to be weighted sum of fuel and oxidizer species (minus N2) and major product at stochiometry.
1512+
"""Set progress variable to be weighted sum of fuel and oxidizer species (minus N2) and major product at stochiometry.
15131513
Weights are set as the inverse of specie molecular weight: negative for reactants, positive for product.
15141514
"""
15151515

Data_Generation/DataGenerator_Base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def SetTrainFraction(self, input:float=DefaultProperties.train_fraction):
119119
Define the fraction of fluid data used for training multi-layer perceptrons.
120120
121121
:param input: fluid data train fraction.
122-
:type input: float
122+
:type input: float
123123
:raise: Exception: if provided fraction is equal or higher than one.
124124
"""
125125
if input >= 1 or input <=0:
@@ -146,7 +146,7 @@ def GetTrainFraction(self):
146146
Get fluid data fraction used for multi-layer perceptron training.
147147
148148
:return: fluid data train fraction.
149-
:rtype: float
149+
:rtype: float
150150
"""
151151
return self.__train_fraction
152152

@@ -155,7 +155,7 @@ def GetTestFraction(self):
155155
Get fluid data fraction used for determining accuracy after training.
156156
157157
:return: fluid data test fraction.
158-
:rtype: float
158+
:rtype: float
159159
"""
160160
return self.__test_fraction
161161

Data_Generation/DataGenerator_FGM.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ def ComputeBurnerFlames(self, mix_status:float, m_dot:np.ndarray[float], T_burne
485485
pass
486486

487487
def ComputeCounterFlowFlames(self, v_fuel:float, v_ox:float, T_ub:float):
488-
"""Generate counter-flow diffusion flamelet data for a given temperature, and reactant velocities.
488+
"""Generate counter-flow diffusion flamelet data for a given temperature, and reactant velocities.
489489
Strain rate is gradually increased until extinction in order to distribute data over the progress variable spectrum.
490490
491491
:param v_fuel: Fuel reactant velocity in meters per second.

Data_Processing/DataPlotters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def __init__(self, Config_in:Config_FGM=None):
5858
def ManualSelection(self, input:bool=False):
5959
"""Select flamelets to plot manually.
6060
61-
:param input: select flamelets manually(True) or all flamelets within
61+
:param input: select flamelets manually(True) or all flamelets within
6262
:type input: bool
6363
"""
6464
self.__manual_select = input

Data_Processing/OptimizeProgressVariable.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ def PlotConvergence(self):
290290

291291

292292
def penalty_function(self, x:np.array):
293-
"""Optimization penalty function computing the derivative of the
293+
"""Optimization penalty function computing the derivative of the
294294
progress vector w.r.t. that of the progress variable increment.
295295
296296
:param x: progress variable weights vector.
@@ -397,10 +397,10 @@ def SetCurveStepThreshold(self, val_tol:float=1e-4):
397397
self.__CurveStepTolerance = val_tol
398398

399399
def SetSpeciesRangeTolerance(self, val_tol:float=1e-5):
400-
"""Specify the minimum change in species mass fraction for species to be
400+
"""Specify the minimum change in species mass fraction for species to be
401401
considered in progress variable optimization.
402402
403-
:param val_tol: species mass fraction range threshold.
403+
:param val_tol: species mass fraction range threshold.
404404
:type val_tol: float
405405
:raises Exception: if threshold value is negative.
406406
"""

Data_Processing/collectFlameletData.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,7 @@ def __ComputeNumberofEvaluations(self, group_variables:list[list[str]]):
10581058
return n_networks_eval
10591059

10601060
def PostProcessGroups(self):
1061-
"""Extract the combinations of variables with the highest affinity and fewest number of network evaluations.
1061+
"""Extract the combinations of variables with the highest affinity and fewest number of network evaluations.
10621062
Groups with most potential are visualized in a figure.
10631063
"""
10641064
min_group = min(self.__n_groups)

Manifold_Generation/LUT/FlameletTableGeneration.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ def VisualizeTableLevel(self, val_mix_frac:float, var_to_plot:str=None):
460460

461461
def GenerateTableNodes(self):
462462
"""
463-
Generate the table nodes and connectivity.
463+
Generate the table nodes and connectivity.
464464
"""
465465

466466
self.__PrepareTableLevels()
@@ -646,7 +646,7 @@ def ComputeTableLevelMesh(self, val_mix_frac:float):
646646
:type val_mix_frac: float
647647
:return Connectivity: Delaunay triangulation connectivity
648648
:rtype Connecivity: NDarray
649-
:return MeshNodes:
649+
:return MeshNodes:
650650
"""
651651
Coord_refinement, Coord_hull, hull_area,z_norm, CV_mesh, table_level_data = self.__ComputeCurvature(val_mix_frac)
652652
MeshNodes_Norm, table_level_data = self.__Compute2DMesh(XY_hull=Coord_hull, XY_refinement=Coord_refinement,val_mixfrac_norm=z_norm, level_area=hull_area)
@@ -661,7 +661,7 @@ def __ComputeCurvature(self, val_mix_frac:float):
661661
Compute the curvature of the reaction rate surface at a constant mixture fraction level. Identify the locations of high curvature where table refinement is required.
662662
663663
:param val_mix_frac: mixture fraction of current table level.
664-
:type val_mix_frac: float
664+
:type val_mix_frac: float
665665
:return XY_refinement: normalized pv and enth coordinates where refinement should be applied.
666666
:rtype XY_refinement: array
667667
:return XY_hull: normalized pv and enth coordinates of the convex hull of the current table level.

Manifold_Generation/MLP/Trainer_Base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ def SaveWeights(self):
378378
return
379379

380380
def SetDecaySteps(self):
381-
"""Set the number of steps in the exponential decay algorithm. The number of steps scale are proportioned based on the number of epochs,
381+
"""Set the number of steps in the exponential decay algorithm. The number of steps scale are proportioned based on the number of epochs,
382382
and training data size and mini batch size.
383383
"""
384384
self._decay_steps = int(1e-3 * self._n_epochs * self._Np_train / self._Np_batch)
@@ -429,7 +429,7 @@ def GetActivationFunction(self):
429429
return self._activation_function_name
430430

431431
def PlotR2Data(self):
432-
"""Plot the MLP prediction in the form of R2-plots w.r.t. the reference data, and along each of the
432+
"""Plot the MLP prediction in the form of R2-plots w.r.t. the reference data, and along each of the
433433
normalized controlling variables.
434434
"""
435435

Manifold_Generation/MLP/Trainers_FGM/Trainers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def GetTrainData(self):
138138
return
139139

140140
def SetTrainVariables(self, train_vars: list[str]):
141-
"""Define the dependent variables to train for. For physics-informed FGM training, the state variables are the same
141+
"""Define the dependent variables to train for. For physics-informed FGM training, the state variables are the same
142142
as the co-state variables.
143143
144144
:param train_vars: dependent variables to train for.
@@ -621,7 +621,7 @@ def add_additional_header_info(self, fid):
621621
return super().add_additional_header_info(fid)
622622

623623
def __SourcetermCorrection(self):
624-
"""Apply correction to source terms such that pv source term and heat release rate are
624+
"""Apply correction to source terms such that pv source term and heat release rate are
625625
always interpolated correctly for equilibrium conditions.
626626
"""
627627

@@ -811,7 +811,7 @@ def EnableBCLoss(self, enable_bc_loss:bool=True):
811811
return
812812

813813
def CheckPINNVars(self):
814-
"""Check if any of the variables in the MLP output group contain physics-informed variables and
814+
"""Check if any of the variables in the MLP output group contain physics-informed variables and
815815
initiate trainer object accordingly.
816816
"""
817817
output_vars = self.__Config.GetMLPOutputGroup(self.__output_group)

TestCases/FGM/hydrogen_PINNs/1:generate_config.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/usr/bin/env python3
22
###############################################################################################
3-
# # _____ __ _____ ____ __ __ ____ # #
4-
# # / ___// / / /__ \ / __ \____ _/ /_____ _/ |/ (_)___ ___ _____ # #
5-
# # \__ \/ / / /__/ / / / / / __ `/ __/ __ `/ /|_/ / / __ \/ _ \/ ___/ # #
6-
# # ___/ / /_/ // __/ / /_/ / /_/ / /_/ /_/ / / / / / / / / __/ / # #
3+
# # _____ __ _____ ____ __ __ ____ # #
4+
# # / ___// / / /__ \ / __ \____ _/ /_____ _/ |/ (_)___ ___ _____ # #
5+
# # \__ \/ / / /__/ / / / / / __ `/ __/ __ `/ /|_/ / / __ \/ _ \/ ___/ # #
6+
# # ___/ / /_/ // __/ / /_/ / /_/ / /_/ /_/ / / / / / / / / __/ / # #
77
# # /____/\____//____/ /_____/\__,_/\__/\__,_/_/ /_/_/_/ /_/\___/_/ # #
88
# # # #
99
###############################################################################################
@@ -20,13 +20,13 @@
2020
# Description: |
2121
# Initiate the FlameletAI configuration for training physics-informed neural networks for |
2222
# FGM applications. |
23-
# |
23+
# |
2424
# Version: 3.1.0 |
2525
# |
2626
#=============================================================================================#
2727

2828
from su2dataminer.config import Config_FGM
29-
import os
29+
import os
3030

3131
# Manifold bounds:
3232

@@ -62,7 +62,7 @@
6262
flamelet_data_dir = os.getcwd() + "/flamelet_data/"
6363
if not os.path.isdir(flamelet_data_dir):
6464
os.mkdir(flamelet_data_dir)
65-
Config.SetOutputDir(flamelet_data_dir)
65+
Config.SetOutputDir(flamelet_data_dir)
6666

6767
# Display configuration info in terminal.
6868
Config.PrintBanner()

0 commit comments

Comments
 (0)