Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
0c97c7c
Get lperm and inp files and call runUSECASEconvert (first implementat…
Oct 16, 2024
9e5431a
Update examples
Oct 16, 2024
3879ce9
Update yaml poc1
Oct 17, 2024
049cdd5
Update paths with paths from nord setup
Oct 21, 2024
82aa9bc
Fix paths 1 and debug prints
Oct 24, 2024
29d1e5b
Update mn5 script
Oct 28, 2024
b74f1fc
Debug prints and comment license run
Oct 28, 2024
7044cc5
Debug prints in workflow.py
Oct 28, 2024
0f90b57
Debug phase run
Oct 28, 2024
9499fb9
Debug phase run:
Oct 28, 2024
da09e48
Remove task (usecase convert)
Oct 28, 2024
c1210aa
Uncomment run simulations
Oct 28, 2024
525ce9d
tmp
Oct 28, 2024
0d7d6bb
W
Oct 28, 2024
b417a2f
Debug index
Oct 29, 2024
7335f20
Pass row folder to prepare data
Oct 29, 2024
05aff5d
Modify template
Oct 29, 2024
3c2ff78
Update template file for usecase convert
Oct 29, 2024
1f5b064
Fix paths to inp and new format({JobName}-s{case_namer}.lperm)
Oct 31, 2024
ef1cdd4
Update mechanical base name, lperm/inp paths
Oct 31, 2024
89f2d1b
Update template for ogv
Oct 31, 2024
306a6c6
Add tply to template
Oct 31, 2024
4cecddf
Update ogv_solver section
Oct 31, 2024
bcae1e8
Update for voids_file_path
Nov 5, 2024
ee369cd
Update template
Nov 5, 2024
981c8c1
Remove debug prints and add task decorator to prepare
Nov 6, 2024
144307f
Call alya
Nov 6, 2024
dbffd58
Use at least 3 cores for alya
Nov 6, 2024
01175e9
Print phase args
Nov 8, 2024
f8e630a
Declare simulation_wdir in workflow (avoid concurrence prepare-alya)
Nov 11, 2024
1a415da
Fix input/output paths(simulation_wdir)
Nov 11, 2024
a6ebdde
Test label setup
Nov 12, 2024
73efaaf
Fix simulation wdir (alya)
Nov 12, 2024
4920e34
Add post process for alya simulation
Nov 12, 2024
f502320
Change paths for RTM simulations
Nov 13, 2024
85bdf1c
Create yamls for 14lines doe
Nov 13, 2024
f468fb9
Update script for 14 doe case
Nov 13, 2024
cd61d17
Change mesh le
Nov 13, 2024
7b245fe
Modify orientation in template
Nov 13, 2024
2f0bce4
Fix results_folder in yamls
Nov 13, 2024
7bb42f8
Take into account the case where DoEline does not exist
Nov 13, 2024
ba0b7cd
Fix quotes in ori
Nov 13, 2024
cae8332
Update orientation for 14 lines case
Nov 13, 2024
59926a8
Generate graph
Nov 13, 2024
f051f86
ignore compss files
Alessio-Di-Domenico May 27, 2025
dc65ab8
updated yamls
Alessio-Di-Domenico May 27, 2025
f86428b
updated inputs
Alessio-Di-Domenico May 27, 2025
bb690c3
updated workflow
Alessio-Di-Domenico May 27, 2025
c5cf076
updated run script
Alessio-Di-Domenico May 27, 2025
e2b77ab
updated phases
Alessio-Di-Domenico May 27, 2025
fb508bc
Âphases naming changedÂ
Alessio-Di-Domenico Jun 11, 2025
795b73f
phases naming changed
Alessio-Di-Domenico Jun 11, 2025
f320287
yamls renamed
Alessio-Di-Domenico Jun 11, 2025
a8fac03
small changes
Alessio-Di-Domenico Jun 13, 2025
59787a8
Fix some issues for full workflows of process and mechanical testing #16
gguillam Jul 16, 2025
e6e5b01
Add workflow A, B and C in AUTOMATION_ML WORKFLOW with examples #16
gguillam Jul 16, 2025
024db5e
Check license file is moved to utils #16
gguillam Jul 16, 2025
9903fc0
Delete old files check license #16
gguillam Jul 16, 2025
918963d
Add workflows for ogv A, B and C and interactive run with compss #16
gguillam Jul 16, 2025
bbc3c3b
Add posptrocess merge for alya #16
gguillam Jul 16, 2025
d4e6ef1
Cleaning some stuff and improving workflows A, B and C #16
gguillam Jul 16, 2025
cf8b976
Add new yamls for OGV updated #16
gguillam Jul 22, 2025
24f1093
Adds some updates for full workflow #16
gguillam Oct 30, 2025
b9505a3
dos2unix to a bunch of python scripts #16
gguillam Oct 31, 2025
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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,8 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

#COMPSs temp files and folders
.COMPSs/
tmp.*/
compss-*
318 changes: 159 additions & 159 deletions PHASES/AUTOMATION_ML/PAM_DISTORTION.py
Original file line number Diff line number Diff line change
@@ -1,159 +1,159 @@
# -*- coding: utf-8 -*-
"""
ESI Group
SMO
"""
import os
import socket
from PHASES.AUTOMATION_ML.utils.bbesi_rtm_api import Visual_API
from pycompss.api.task import task
from pycompss.api.parameter import *
from pycompss.api.constraint import constraint
from pycompss.api.multinode import multinode
@constraint(computing_units=16)
@multinode(computing_nodes=1)
@task(inputs_folder=DIRECTORY_IN, outputs_folder=DIRECTORY_OUT, source_folder=DIRECTORY_IN, returns=1)
def run(Curing_base_name, Distortion_Base_Name, inputs_folder, outputs_folder, source_folder, **kwargs):
# import socket
# Variables
# Visual will read the variables values from a txt file that is written at the end of this section
print('_____________________________________________________________________________________')
print('Starting distortion simulation')
if source_folder:
source_folder_folder = source_folder
if inputs_folder:
input_files_folder =inputs_folder
if outputs_folder:
outputs_files_folder =outputs_folder
if not os.path.exists(outputs_files_folder):
os.makedirs(outputs_files_folder)
print("Folder '{}' created.".format(outputs_files_folder))
else:
print("Folder '{}' already exists.".format(outputs_files_folder))
else:
print('no outputs file provided!!!')
#Distortion_Base_Name = 'Lk_Distortion_40'
#Curing_base_name = 'Lk_Curing'
if "machine" in kwargs:
machine = kwargs["machine"]
if "gaps" in kwargs:
gaps = kwargs["gaps"]
display = 0
# paths
if machine == 'BORLAP020':
DistortionSolverFolderPath = r'C:\Program Files\ESI Group\PAM-COMPOSITES\2022.5\Solver\bin'
DistortionSolverFilePath = r'C:\Program Files\ESI Group\PAM-COMPOSITES\2022.5\Solver\bin\pamdistortion.bat'
if display == 1:
DistortionsolverVEPath = r'C:\Program Files\ESI Group\Visual-Environment\18.0\Windows-x64\VisualEnvironment.bat'
else:
DistortionsolverVEPath = r'C:\Program Files\ESI Group\Visual-Environment\18.0\Windows-x64\VEBatch.bat'
DistortionsolverWinTailPath = r"C:\Program Files\ESI Group\PAM-COMPOSITES\2022.5\Solver\bin\WinTail.exe"
elif machine == 'bruclu':
display = 0
DistortionSolverFolderPath = r'/nisprod/ppghome/ppg/dist/pamdistortion/2022.5/Linux_x86_64/bin'
DistortionSolverFilePath = r'/nisprod/ppghome/ppg/dist/pamdistortion/2022.5/Linux_x86_64/bin/pamdistortion'
DistortionsolverVEPath = r'/nisprod/ppghome/ppg/dist/Visual-Environment/18.0/Linux_x86_64_2.17/VEBatch.sh'
DistortionsolverWinTailPath = r"C:\Program Files\ESI Group\PAM-COMPOSITES\2022.5\Solver\bin\WinTail.exe"
elif machine == 'HPCBSC':
display = 0
DistortionSolverFolderPath = r'/gpfs/projects/bsce81/MN4/bsce81/esi/pamdistortion/2022.5/Linux_x86_64/bin'
DistortionSolverFilePath = r'/gpfs/projects/bsce81/MN4/bsce81/esi/pamdistortion/2022.5/Linux_x86_64/bin/pamdistortion'
DistortionsolverVEPath = r'/gpfs/projects/bsce81/MN4/bsce81/esi/Visual-Environment/18.0/Linux_x86_64_2.17/VEBatch.sh'
DistortionsolverWinTailPath = r"C:\Program Files\ESI Group\PAM-COMPOSITES\2022.5\Solver\bin\WinTail.exe"
# Fixed variables
SourceDirectory = source_folder_folder
VariablesTxtPath = os.path.join(os.getcwd(), 'VariablesList.txt')
CuringVdbName = Curing_base_name + '.vdb'
DistortionVdbName = Distortion_Base_Name + '.vdb'
DistortionPcName = Distortion_Base_Name + '.pc'
DistortionIncName = Distortion_Base_Name + '.inc'
DistortionOriName = Distortion_Base_Name + '.ori'
Curingbasefolder = input_files_folder
Distortionbasefolder = outputs_files_folder
VdbCuringFilePath = os.path.join(Curingbasefolder, CuringVdbName)
CuringCATGENerfName = Curing_base_name + '_CATGEN.erfh5'
CuringCATGENerfPath = os.path.join(Curingbasefolder, CuringCATGENerfName)
SourceVdbDistortionFilePath = os.path.join(SourceDirectory, DistortionVdbName)
sourcePcDistortionFilePath = os.path.join(SourceDirectory, DistortionPcName)
sourceIncDistortionFilePath = os.path.join(SourceDirectory, DistortionIncName)
sourceOriDistortionFilePath = os.path.join(SourceDirectory, DistortionOriName)
VdbDistortionFilePath = os.path.join(Distortionbasefolder, DistortionVdbName)
PcDistortionFilePath = os.path.join(Distortionbasefolder, DistortionPcName)
import shutil
shutil.copy(SourceVdbDistortionFilePath, outputs_files_folder)
MacroDistortionList = [#'31_DistortionPreparingModel.py',
#'32_DistortionResinParameters.py',
#'33_DistortionFiberParameters.py',
#'34_DistortionComputePly.py',
#'35_DistortionCharacterizeLaminate.py',
'36_DistortionProcessConditions.py',
'37_DistortionSimulationParameters.py'
]
#%% Start running the DoE
#write for macros
VariablesDict = {}
VariablesDict['VdbCuringFilePath'] = VdbCuringFilePath
VariablesDict['VdbDistortionFilePath'] = VdbDistortionFilePath
VariablesDict['SourceFilesPath'] = SourceDirectory
VariablesDict['DistortionSolverFolderPath'] = DistortionSolverFolderPath
VariablesDict['DistortionSolverFilePath'] = DistortionSolverFilePath
VariablesDict['CuringCATGENerfPath'] = CuringCATGENerfPath
VariablesDict['outputs_files_folder'] = outputs_files_folder
# Default values
VariablesDict['Viscosity'] = 0.2
# Write the variables in a txt file.
f = open(os.path.join(VariablesTxtPath), "w+")
for elem in VariablesDict:
f.write(str(elem) + "= " + str(VariablesDict[elem]) + "\n")
f.close()
#Application initialization
Distortionmodel = Visual_API()
Distortionmodel.FileName = Distortion_Base_Name
Distortionmodel.solverPath = DistortionSolverFilePath
Distortionmodel.solverVEPath = DistortionsolverVEPath
Distortionmodel.basefolder = Distortionbasefolder
Distortionmodel.inputFile = PcDistortionFilePath
Distortionmodel.SourceFilesPath = SourceDirectory
Distortionmodel.VariablesTxtPath = VariablesTxtPath
if machine == 'BORLAP020':
BatFileName = Distortion_Base_Name + '.bat'
else:
BatFileName = Distortion_Base_Name + '.sh'
Distortionmodel.BatFilePath = os.path.join(Distortionbasefolder, BatFileName)
Distortionmodel.DistortionsolverWinTailPath = DistortionsolverWinTailPath
Distortionmodel.simtype = 'DISTORTION'
Distortionmodel.machine = machine
OutputfileName = Distortion_Base_Name + '.out'
Distortionmodel.outputFile = os.path.join(Distortionbasefolder, OutputfileName)
Distortionmodel.display = display
Distortionmodel.fp = 1 # Floating point precision (1: SP , 2: DP , note IMPLICIT requires DP)
Distortionmodel.nt = 2 # Number of threads
Distortionmodel.mp = 1 # 1 (default): SMP parallel mode; 2: DMP parallel mode
Distortionmodel.np = 16
# #Execute macros
for elem in MacroDistortionList:
Distortionmodel.LaunchMacro(elem)
Distortionmodel.LaunchMacro('38_DistortionRun.py')
# solve
Distortionmodel.solveStep(runInBackground=False)
return "PAM_DISTORSION finished"
# -*- coding: utf-8 -*-
"""
ESI Group
SMO
"""
import os
import socket
from PHASES.AUTOMATION_ML.utils.bbesi_rtm_api import Visual_API
from pycompss.api.task import task
from pycompss.api.parameter import *
from pycompss.api.constraint import constraint
from pycompss.api.multinode import multinode

@constraint(computing_units=24)
@multinode(computing_nodes=1)
@task(inputs_folder=DIRECTORY_IN, outputs_folder=DIRECTORY_OUT, source_folder=DIRECTORY_IN, returns=1)
def run(Curing_base_name, Distortion_Base_Name, inputs_folder, outputs_folder, source_folder, **kwargs):
# import socket
# Variables
# Visual will read the variables values from a txt file that is written at the end of this section
print('_____________________________________________________________________________________')
print('Starting distortion simulation')
if source_folder:
source_folder_folder = source_folder

if inputs_folder:
input_files_folder =inputs_folder
if outputs_folder:
outputs_files_folder =outputs_folder
if not os.path.exists(outputs_files_folder):
os.makedirs(outputs_files_folder)
print("Folder '{}' created.".format(outputs_files_folder))
else:
print("Folder '{}' already exists.".format(outputs_files_folder))
else:
print('no outputs file provided!!!')

#Distortion_Base_Name = 'Lk_Distortion_40'
#Curing_base_name = 'Lk_Curing'

if "machine" in kwargs:
machine = kwargs["machine"]

if "gaps" in kwargs:
gaps = kwargs["gaps"]

display = 0
# paths
if machine == 'BORLAP020':
DistortionSolverFolderPath = r'C:\Program Files\ESI Group\PAM-COMPOSITES\2022.5\Solver\bin'
DistortionSolverFilePath = r'C:\Program Files\ESI Group\PAM-COMPOSITES\2022.5\Solver\bin\pamdistortion.bat'
if display == 1:
DistortionsolverVEPath = r'C:\Program Files\ESI Group\Visual-Environment\18.0\Windows-x64\VisualEnvironment.bat'
else:
DistortionsolverVEPath = r'C:\Program Files\ESI Group\Visual-Environment\18.0\Windows-x64\VEBatch.bat'
DistortionsolverWinTailPath = r"C:\Program Files\ESI Group\PAM-COMPOSITES\2022.5\Solver\bin\WinTail.exe"
elif machine == 'bruclu':
display = 0
DistortionSolverFolderPath = r'/nisprod/ppghome/ppg/dist/pamdistortion/2022.5/Linux_x86_64/bin'
DistortionSolverFilePath = r'/nisprod/ppghome/ppg/dist/pamdistortion/2022.5/Linux_x86_64/bin/pamdistortion'
DistortionsolverVEPath = r'/nisprod/ppghome/ppg/dist/Visual-Environment/18.0/Linux_x86_64_2.17/VEBatch.sh'
DistortionsolverWinTailPath = r"C:\Program Files\ESI Group\PAM-COMPOSITES\2022.5\Solver\bin\WinTail.exe"
elif machine == 'HPCBSC':
display = 0
DistortionSolverFolderPath = r'/gpfs/projects/bsce81/MN4/bsce81/esi/pamdistortion/2022.5/Linux_x86_64/bin'
DistortionSolverFilePath = r'/gpfs/projects/bsce81/MN4/bsce81/esi/pamdistortion/2022.5/Linux_x86_64/bin/pamdistortion'
DistortionsolverVEPath = r'/gpfs/projects/bsce81/MN4/bsce81/esi/Visual-Environment/18.0/Linux_x86_64_2.17/VEBatch.sh'
DistortionsolverWinTailPath = r"C:\Program Files\ESI Group\PAM-COMPOSITES\2022.5\Solver\bin\WinTail.exe"

# Fixed variables
SourceDirectory = source_folder_folder
VariablesTxtPath = os.path.join(os.getcwd(), 'VariablesList.txt')
CuringVdbName = Curing_base_name + '.vdb'
DistortionVdbName = Distortion_Base_Name + '.vdb'
DistortionPcName = Distortion_Base_Name + '.pc'
DistortionIncName = Distortion_Base_Name + '.inc'
DistortionOriName = Distortion_Base_Name + '.ori'
Curingbasefolder = input_files_folder
Distortionbasefolder = outputs_files_folder

VdbCuringFilePath = os.path.join(Curingbasefolder, CuringVdbName)
CuringCATGENerfName = Curing_base_name + '_CATGEN.erfh5'
CuringCATGENerfPath = os.path.join(Curingbasefolder, CuringCATGENerfName)
SourceVdbDistortionFilePath = os.path.join(SourceDirectory, DistortionVdbName)
sourcePcDistortionFilePath = os.path.join(SourceDirectory, DistortionPcName)
sourceIncDistortionFilePath = os.path.join(SourceDirectory, DistortionIncName)
sourceOriDistortionFilePath = os.path.join(SourceDirectory, DistortionOriName)

VdbDistortionFilePath = os.path.join(Distortionbasefolder, DistortionVdbName)
PcDistortionFilePath = os.path.join(Distortionbasefolder, DistortionPcName)

import shutil
shutil.copy(SourceVdbDistortionFilePath, outputs_files_folder)

MacroDistortionList = [#'31_DistortionPreparingModel.py',
#'32_DistortionResinParameters.py',
#'33_DistortionFiberParameters.py',
#'34_DistortionComputePly.py',
#'35_DistortionCharacterizeLaminate.py',
'36_DistortionProcessConditions.py',
'37_DistortionSimulationParameters.py'
]

#%% Start running the DoE
#write for macros
VariablesDict = {}
VariablesDict['VdbCuringFilePath'] = VdbCuringFilePath
VariablesDict['VdbDistortionFilePath'] = VdbDistortionFilePath
VariablesDict['SourceFilesPath'] = SourceDirectory
VariablesDict['DistortionSolverFolderPath'] = DistortionSolverFolderPath
VariablesDict['DistortionSolverFilePath'] = DistortionSolverFilePath
VariablesDict['CuringCATGENerfPath'] = CuringCATGENerfPath
VariablesDict['outputs_files_folder'] = outputs_files_folder

# Default values
VariablesDict['Viscosity'] = 0.2

# Write the variables in a txt file.
f = open(os.path.join(VariablesTxtPath), "w+")
for elem in VariablesDict:
f.write(str(elem) + "= " + str(VariablesDict[elem]) + "\n")
f.close()

#Application initialization
Distortionmodel = Visual_API()
Distortionmodel.FileName = Distortion_Base_Name
Distortionmodel.solverPath = DistortionSolverFilePath
Distortionmodel.solverVEPath = DistortionsolverVEPath
Distortionmodel.basefolder = Distortionbasefolder
Distortionmodel.inputFile = PcDistortionFilePath
Distortionmodel.SourceFilesPath = SourceDirectory
Distortionmodel.VariablesTxtPath = VariablesTxtPath

if machine == 'BORLAP020':
BatFileName = Distortion_Base_Name + '.bat'
else:
BatFileName = Distortion_Base_Name + '.sh'
Distortionmodel.BatFilePath = os.path.join(Distortionbasefolder, BatFileName)
Distortionmodel.DistortionsolverWinTailPath = DistortionsolverWinTailPath
Distortionmodel.simtype = 'DISTORTION'
Distortionmodel.machine = machine
OutputfileName = Distortion_Base_Name + '.out'
Distortionmodel.outputFile = os.path.join(Distortionbasefolder, OutputfileName)
Distortionmodel.display = display
Distortionmodel.fp = 1 # Floating point precision (1: SP , 2: DP , note IMPLICIT requires DP)
Distortionmodel.nt = 2 # Number of threads
Distortionmodel.mp = 1 # 1 (default): SMP parallel mode; 2: DMP parallel mode
Distortionmodel.np = 24
# #Execute macros
for elem in MacroDistortionList:
Distortionmodel.LaunchMacro(elem)

Distortionmodel.LaunchMacro('38_DistortionRun.py')

# solve
Distortionmodel.solveStep(runInBackground=False)

return "PAM_DISTORSION finished"

Loading