diff --git a/pyproject.toml b/pyproject.toml index 46e1d05..32b9226 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "panel-codes-service" -version = "0.1.1" +version = "0.2.0" description = "" authors = ["time-trader"] license = "MIT" diff --git a/tests/test_deployment.py b/tests/test_deployment.py index 23132b8..3b67d49 100644 --- a/tests/test_deployment.py +++ b/tests/test_deployment.py @@ -17,9 +17,8 @@ def test_deployment(self): ) input_values = { - "airfoil_geometry": {"airfoil_geometry_filename": "naca_0012.dat"}, + "airfoil_geometry": {"airfoil_geometry_filename": "naca_0012.dat", "repanel": False}, "alpha_range": [0, 6, 3], - "repanel": False, "inflow_speed": 100, "kinematic_viscosity": 15e-6, "characteristic_length": 1, diff --git a/tests/xfoil/cases/naca0012/input_values.json b/tests/xfoil/cases/naca0012/input_values.json index 7b39bb9..9cf454d 100644 --- a/tests/xfoil/cases/naca0012/input_values.json +++ b/tests/xfoil/cases/naca0012/input_values.json @@ -1,8 +1,8 @@ { "airfoil_geometry":{ - "airfoil_geometry_filename": "naca_0012.dat" + "airfoil_geometry_filename": "naca_0012.dat", + "repanel": false }, - "repanel": false, "alpha_range": [0, 6, 3], "inflow_speed": 100, "kinematic_viscosity": 15e-5, diff --git a/tests/xfoil/cases/naca0018/input_values.json b/tests/xfoil/cases/naca0018/input_values.json index 4f55b3a..f575564 100644 --- a/tests/xfoil/cases/naca0018/input_values.json +++ b/tests/xfoil/cases/naca0018/input_values.json @@ -21,9 +21,9 @@ -0.0848389 , -0.07941038, -0.07257604, -0.06472053, -0.05621423, -0.04740459, -0.03861703, -0.03016091, -0.02233527, -0.01542949, -0.00971646, -0.00543833, -0.0027879 , -0.00189 ] - } + }, + "repanel": false }, - "repanel": false, "alpha_range": [0, 6, 3], "inflow_speed": 100, "kinematic_viscosity": 15e-5, diff --git a/twine.json b/twine.json index 815c071..4902e84 100644 --- a/twine.json +++ b/twine.json @@ -88,14 +88,24 @@ "title": "Airfoil geometry filename", "description": "Filename from the Dataset containing geometry files ex. naca_0012.dat", "type": "string" + }, + "repanel": { + "title": "Repanel Airfoil", + "description":"Use XFOIL routines to re-panel the geometry?", + "type": "boolean", + "default": false + }, + "repanel_configuration": { + "type": "object", + "properties": { + "nodes": { + "description": "Number of nodes used to re-panel the airfoil", + "type": "integer" + } + } } } }, - "repanel": { - "title": "Repanel Airfoil", - "type": "boolean", - "default": false - }, "alpha_range": { "description": "The range of alpha values at which the solver will be run.", "type": "array", diff --git a/xfoil_module/routines.py b/xfoil_module/routines.py index 721f8a3..ed617aa 100644 --- a/xfoil_module/routines.py +++ b/xfoil_module/routines.py @@ -15,8 +15,8 @@ def call(analysis): # TODO [?] Should airfoil section and repanel settings be in config rather then input? # It is possible to re-panel - if analysis.input_values['repanel']: - xf.repanel(n_nodes=analysis.input_values['repanel_configuration']['nodes']) + if analysis.input_values["airfoil_geometry"]['repanel']: + xf.repanel(n_nodes=analysis.input_values["airfoil_geometry"]['repanel_configuration']['nodes']) # Reynolds number, xf.Re = set_input(analysis.input_values)[0]