Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Improve twin schema #8

Merged
merged 3 commits into from
Feb 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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