abqFun
- czmtestkit.py_modules.abqFun(InputData, function, wd)
Run abaqus-python modules as subprocesses. See
czmtestkit.abaqus_modules
for available functions and instructions to create your own abaqus-python function that is compatible with theczmtestkit
.- Parameters
InputData (str):
.json
file name with input dictionary.function (str): abaqus_modules function based on abaqus-python script to be executed.
wd (str): work directory for the abaqus_modules functIon.
Example
- Assume that
czmtestkit.abqPy_Func1
is a function based on abaqus-python scripting language to run Abaqus/CAE simulation. Also assume that
abqPy_Func1
takes a dictionary as input parameter with param_1, param_2 and param_3 as keys within the dictionary. Run the abaqus-python script usingabqFun()
as shown below
# Create dictionary In_dict_Func1 = { 'param_1': value_param1 'param_2': value_param2 'param_3': value_param3 } # Write data to a .json file import json filePath = 'dataIn.json' with open(filePath, 'a') as file: json.dump(In_dict_Func1, file) file.write("\n") # Execute the abaqus-python script with czmtestkit in the current working directory import os czmtestkit.py_modules.abqFun(filePath, 'czmtestkit.abaqus_modules.abqPy_Func1',os.getcwd())