diff --git a/examples/gwk_compressor/Snakefile b/examples/gwk_compressor/Snakefile new file mode 100644 index 0000000000000000000000000000000000000000..8cece780bce641f87f1d6084aa95bb837525b8e9 --- /dev/null +++ b/examples/gwk_compressor/Snakefile @@ -0,0 +1,30 @@ +from snakemake.utils import validate +from ntrfc.preprocessing.geometry_creation.profile_pointcloud import hello + +configfile : "casesettings.yml" +validate("config","config.schema.yaml") + +rule from_pointcloud: + input: + "00_resources/profile_pointcloud.txt" + output: + "01_geometry/ssPoly.pkl", "01_geometry/psPoly.pkl" + run: + hello + +rule from_naca_generator: +# input: +# "input/helloworld.txt" +# output: +# "output/heythere.txt" + shell: + "python helloworld.py" + + +rule create_parsec_generator: +# input: +# "input/helloworld.txt" +# output: +# "output/heythere.txt" + shell: + "python helloworld.py" diff --git a/examples/gwk_compressor/casesettings.yml b/examples/gwk_compressor/casesettings.yml new file mode 100644 index 0000000000000000000000000000000000000000..00f03f4587e1270e6faca1715355705469c4e821 --- /dev/null +++ b/examples/gwk_compressor/casesettings.yml @@ -0,0 +1,12 @@ +blade: + algorithm: "from_pointcloud" + ptcloud_profile: "00_Ressources/profile_pointcloud.txt" #Name of the pointcloud-file + ptcloud_profile_unit: "mm" #m vs mm + +geometry: + pitch : 0.0765 #Pitch [m] + alpha : 0.01 #Geometric parameter used for hull-calculations + midline_tolerance : 5 #Tolerance coefficient for midline-generation + x_inlet : -0.13 #Shift Inlet along x [m] + x_outlet : 0.26 #Shift Outlet along x [m] + shift_domain : 0.015 #Shift Domain to have probes inside domain [m] diff --git a/examples/gwk_compressor/config.schema.yaml b/examples/gwk_compressor/config.schema.yaml new file mode 100644 index 0000000000000000000000000000000000000000..cc71f8219f33ad0e4fc7a38239a089752bd768c3 --- /dev/null +++ b/examples/gwk_compressor/config.schema.yaml @@ -0,0 +1,49 @@ +$schema: "http://json-schema.org/draft-06/schema#" +description: Config file for the parPE snakemake optimization workflow + +type: dict +properties: + blade: + type: dict + description: settings for the generation of the profile-splines + + properties: + algorithm: + type: string + description: definition of the generation-algorithm (from_pointcloud, nacagen, parsecgen) + + ptcloud_profile: + type: string + description: in case from_pointcloud is picked, one has to define a path to the pointcloudfile + + ptcloud_profile_unit: + type: string #m vs mm + description: in case from_pointcloud is picked, one has to define the right unit (a default-value for m should be defined) + + alpha: + type: string #Geometric parameter used for hull-calculations + description: an alpha-value for the alphashape has to be defined + geometry: + type: dict + properties: + + pitch: + type: string #Pitch [m] + description: the pitch of the cascade-blades has to be defined + + x_inlet: + type: string + description: position of the inlet x-position has to be defined. LE is the zeroposition + + x_outlet: + type: string + description: position of the outlet x-position has to be defined. LE is the zeroposition + + shift_domain: + type : string + description: shift the blade in the domain, so that probes can be placed in the passage-midline + +required: + - blade + - geometry + diff --git a/ntrfc/preprocessing/geometry_creation/profile_pointcloud.py b/ntrfc/preprocessing/geometry_creation/profile_pointcloud.py new file mode 100644 index 0000000000000000000000000000000000000000..dd9b9d4ddd4c48a899a3993dfaad99afd2976c48 --- /dev/null +++ b/ntrfc/preprocessing/geometry_creation/profile_pointcloud.py @@ -0,0 +1,2 @@ +def hello(): + print("hello") diff --git a/snakepipes/profile_creation/Snakefile b/snakepipes/profile_creation/Snakefile index 78fb89dcb217562883ed2e32819358098b66bac3..2b2de20c98ccfa924c5449f6953533e6399b290a 100644 --- a/snakepipes/profile_creation/Snakefile +++ b/snakepipes/profile_creation/Snakefile @@ -1,3 +1,5 @@ +configfile : "casesettings.yml" + rule from_pointcloud: # input: # "input/helloworld.txt" @@ -14,6 +16,7 @@ rule from_naca_generator: shell: "python helloworld.py" + rule create_parsec_generator: # input: # "input/helloworld.txt"