Skip to content

Commit

Permalink
MRG: Merge pull request #3 from aerosense-ai/feature/improve-geometry…
Browse files Browse the repository at this point in the history
…-file-handling

Feature: Improve geometry file handling
  • Loading branch information
time-trader committed Feb 22, 2023
2 parents e5abaed + 358ce7e commit b3f865b
Show file tree
Hide file tree
Showing 17 changed files with 272 additions and 354 deletions.
6 changes: 3 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ def run(analysis):
if analysis.configuration_values['analysis_program'] == 'xfoil':
xfoil_module.call(analysis) # Pass the parsed input and configuration schema
elif analysis.configuration_values['analysis_program'] == 'vgfoil':
pass
raise NotImplementedError("Vortex Generator XFOIL is not implemented yet!")
elif analysis.configuration_values['analysis_program'] == 'viiflow':
pass
raise NotImplementedError("VIIFLOW is not implemented!")
elif analysis.config['analysis_program'] == 'rfoil':
pass
raise NotImplementedError("RFOIL by DTU is not implemented!")

analysis.finalise()

1 change: 1 addition & 0 deletions app_configuration.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"configuration_values": {
"analysis_program": "xfoil",
"silent_mode": true,
"max_iterations":1000,
"backend": {
"name": "GCPPubSubBackend",
Expand Down
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.0.1"
version = "0.1.0"
description = ""
authors = ["time-trader"]
license = "MIT"
Expand Down
12 changes: 6 additions & 6 deletions tests/test_deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ def test_deployment(self):
)

input_values = {
"airfoil_label": "naca-0012",
"alpha_range": [-10, 10, 3],
"airfoil_geometry": {"airfoil_geometry_filename": "naca_0012.dat"},
"alpha_range": [0, 6, 3],
"repanel": False,
"inflow_speed": 1,
"kinematic_viscosity": 1e-6,
"inflow_speed": 100,
"kinematic_viscosity": 15e-6,
"characteristic_length": 1,
"mach_number": 0,
"mach_number": 0.3,
"n_critical": 9,
"re_xtr": [5e5, 5e5]
}

child = Child(
id="aerosense/panel-codes:0.0.1",
id="aerosense/panel-codes:0.1.0",
backend={"name": "GCPPubSubBackend", "project_name": "aerosense-twined"},
)

Expand Down
100 changes: 100 additions & 0 deletions tests/xfoil/cases/geometry_files/naca_0012.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
NACA 0012
1.0 0.001259999999999961
0.9989726963751682 0.0014040493416585976
0.995895006911623 0.0018345117033156443
0.9907795784955327 0.002546378519492576
0.9836474315195147 0.0035314603586487857
0.9745278735053343 0.004778613096363204
0.9634583786730109 0.006274033209535457
0.9504844339512095 0.008001602738627567
0.9356593520616946 0.009943261463357889
0.9190440524459202 0.0120793824996697
0.9007068109339782 0.014389127962265257
0.8807229791845671 0.016850763530399014
0.8591746750488638 0.019441914560854912
0.8361504451306583 0.022139751549135712
0.8117449009293667 0.024921098885267084
0.7860583300610847 0.02776246754545424
0.7591962841552625 0.03064001911992698
0.7312691451204175 0.0335294749024683
0.7023916715611969 0.036405989181707066
0.6726825272106538 0.03924400995674493
0.6422637933155162 0.042017152713799105
0.6112604669781572 0.044698113419960064
0.5797999475166895 0.04725864541609541
0.5480115129538408 0.049669621461258355
0.5160257887858275 0.051901196970272546
0.48397421121417233 0.053923083796600414
0.45198848704615907 0.05570493615594077
0.4202000524833103 0.0572168419582061
0.3887395330218428 0.05842990446522902
0.3577362066844837 0.05931689138456282
0.3273174727893461 0.05985292179191054
0.297608328438803 0.060016156135453885
0.26873085487958226 0.05978845141434716
0.24080371584473742 0.059155942722917854
0.21394166993891517 0.058109513855317485
0.1882550990706332 0.05664512356573905
0.16384955486934155 0.054763960217197954
0.1408253249511362 0.05247240562202703
0.11927702081543279 0.04978179844561356
0.09929318906602164 0.04670799807385356
0.08095594755407964 0.04327076072521185
0.0643406479383053 0.03949295017664457
0.04951556604879043 0.03539961513073343
0.03654162132698913 0.03101697338598821
0.02547212649466568 0.026371349072557632
0.016352568480485274 0.02148811288557696
0.009220421504467335 0.016390676232584025
0.004104993088376918 0.011099588411875591
0.0010273036248318324 0.00563178142223335
0.0 0.0
0.0010273036248318324 -0.00563178142223335
0.004104993088376918 -0.011099588411875591
0.009220421504467335 -0.016390676232584025
0.016352568480485274 -0.02148811288557696
0.02547212649466568 -0.026371349072557632
0.03654162132698913 -0.03101697338598821
0.04951556604879043 -0.03539961513073343
0.0643406479383053 -0.03949295017664457
0.08095594755407964 -0.04327076072521185
0.09929318906602164 -0.04670799807385356
0.11927702081543279 -0.04978179844561356
0.1408253249511362 -0.05247240562202703
0.16384955486934155 -0.054763960217197954
0.1882550990706332 -0.05664512356573905
0.21394166993891517 -0.058109513855317485
0.24080371584473742 -0.059155942722917854
0.26873085487958226 -0.05978845141434716
0.297608328438803 -0.060016156135453885
0.3273174727893461 -0.05985292179191054
0.3577362066844837 -0.05931689138456282
0.3887395330218428 -0.05842990446522902
0.4202000524833103 -0.0572168419582061
0.45198848704615907 -0.05570493615594077
0.48397421121417233 -0.053923083796600414
0.5160257887858275 -0.051901196970272546
0.5480115129538408 -0.049669621461258355
0.5797999475166895 -0.04725864541609541
0.6112604669781572 -0.044698113419960064
0.6422637933155162 -0.042017152713799105
0.6726825272106538 -0.03924400995674493
0.7023916715611969 -0.036405989181707066
0.7312691451204175 -0.0335294749024683
0.7591962841552625 -0.03064001911992698
0.7860583300610847 -0.02776246754545424
0.8117449009293667 -0.024921098885267084
0.8361504451306583 -0.022139751549135712
0.8591746750488638 -0.019441914560854912
0.8807229791845671 -0.016850763530399014
0.9007068109339782 -0.014389127962265257
0.9190440524459202 -0.0120793824996697
0.9356593520616946 -0.009943261463357889
0.9504844339512095 -0.008001602738627567
0.9634583786730109 -0.006274033209535457
0.9745278735053343 -0.004778613096363204
0.9836474315195147 -0.0035314603586487857
0.9907795784955327 -0.002546378519492576
0.995895006911623 -0.0018345117033156443
0.9989726963751682 -0.0014040493416585976
1.0 -0.001259999999999961
9 changes: 9 additions & 0 deletions tests/xfoil/cases/naca0012/configuration_values.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"analysis_program": "xfoil",
"silent_mode": true,
"max_iterations":1000,
"backend": {
"name": "GCPPubSubBackend",
"project_name": "aerosense-twined"
}
}
4 changes: 0 additions & 4 deletions tests/xfoil/cases/naca0012/data/configuration/values.json

This file was deleted.

This file was deleted.

Loading

0 comments on commit b3f865b

Please sign in to comment.