Skip to content

Commit

Permalink
MRG: Merge pull request #8 from aerosense-ai/feature/improve-twin-schema
Browse files Browse the repository at this point in the history
Feature: Improve twin schema
  • Loading branch information
time-trader authored Feb 24, 2023
2 parents b7a02a3 + 5a7db2d commit 156ca5a
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 14 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "panel-codes-service"
version = "0.1.1"
version = "0.2.0"
description = ""
authors = ["time-trader"]
license = "MIT"
Expand Down
3 changes: 1 addition & 2 deletions tests/test_deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions tests/xfoil/cases/naca0012/input_values.json
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
4 changes: 2 additions & 2 deletions tests/xfoil/cases/naca0018/input_values.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
20 changes: 15 additions & 5 deletions twine.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions xfoil_module/routines.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 156ca5a

Please sign in to comment.