You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
i've been trying to use the watts.PluginGeneric to run templated OpenFOAM calculations.
First I'm trying to run a simple meshing script, this requires the following directory structure:
Where blockMeshDict is templated and controlDict is not.
My watts script looks like this:
importwattsparams=watts.Parameters(nx=20) # Number of mesh cells in the x directionplugin=watts.PluginGeneric(
"blockMesh",
"{self.executable}",
"system/blockMeshDict",
extra_inputs=["system/controlDict"],
show_stdout=True,
show_stderr=True
)
result=plugin(params)
This fails because the two files are copied at the root of the temporary directory, so the "system/*" structure is not preserved and OpenFOAM is lost.
Looking at the code it seems there is no obvious way of preserving the path structure, as all path are made absolute and are simply copied to the temp directory using shutil.copy
Is there any way of preserving the directory structure? If not, is there interest in adding this feature? I don't mind implementing this if this is interesting to you.
Cheers
The text was updated successfully, but these errors were encountered:
Hello,
i've been trying to use the watts.PluginGeneric to run templated OpenFOAM calculations.
First I'm trying to run a simple meshing script, this requires the following directory structure:
Where blockMeshDict is templated and controlDict is not.
My watts script looks like this:
This fails because the two files are copied at the root of the temporary directory, so the "system/*" structure is not preserved and OpenFOAM is lost.
Looking at the code it seems there is no obvious way of preserving the path structure, as all path are made absolute and are simply copied to the temp directory using shutil.copy
Is there any way of preserving the directory structure? If not, is there interest in adding this feature? I don't mind implementing this if this is interesting to you.
Cheers
The text was updated successfully, but these errors were encountered: