-
-
Notifications
You must be signed in to change notification settings - Fork 277
ENH: automate dispersion inputs with csv #229
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
Merged
Merged
Changes from 15 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
542cd1b
implemented dictionary creation
bc1fb76
implemented dictionary creation
3e0d8e5
Merge branch 'enh/automate_dispersion' of https://github.com/RocketPy…
6093de3
formating
3c89ecf
Fix code style issues with Black
lint-action 05ff066
Update utilities.py
FranzYuri b4f5560
included xlsx
cb2c2c9
removed libraries
68ba507
removing libraries
b26650b
Merge branch 'enh/automate_dispersion' of https://github.com/RocketPy…
dae5056
fixing errors and adding Valetudo.csv
2c065fa
Fix code style issues with Black
lint-action 5671927
ENH: Dealing with expect errors cases
Gui-FernandesBR 88d3a47
FIX: Refactor .csv files
Gui-FernandesBR e9f1e53
ENH: adding tests
Gui-FernandesBR 26078c5
FIX: Revert wrong name replace
Gui-FernandesBR adf9414
ENH: improve utilities' tests
Gui-FernandesBR File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| attribute_class; parameter_name; mean_value; standard_deviation; | ||
| environment; ensembleMember; [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];; | ||
| motor; impulse; 1415.15; 35.3; | ||
| motor; burnOut; 5.274; 1; | ||
| motor; nozzleRadius; 0.021642; 0.0005; | ||
| motor; throatRadius; 0.008; 0.0005; | ||
| motor; grainSeparation; 0.006; 0.001; | ||
| motor; grainDensity; 1707; 50; | ||
| motor; grainOuterRadius; 0.0214; 0.2; | ||
| motor; grainInitialInnerRadius; .0097;0.000375; | ||
| motor; grainInitialHeight; 0.12; 0.001 | ||
| rocket; rocketMass; 8.257; 0.001; | ||
| rocket; inertiaI; 3.675; 0.03675; | ||
| rocket; inertiaZ; 0.007; 0.00007; | ||
| rocket; radius; 0.04045; 0.001; | ||
| rocket; distanceRocketNozzle; -1.024; .001; | ||
| rocket; distanceRocketPropellant; -0.51; 0.001; | ||
| rocket; powerOffDrag; 0.864857143; 0.03; | ||
| rocket; powerOnDrag; 0.864857143; 0.03; | ||
| rocket; noseLength; 0.274; 0.001; | ||
| rocket; noseDistanceToCM; 1.134; 0.001 | ||
| fins; finSpan; 0.077; 0.0005; | ||
| fins; finRootChord; 0.058; 0.0005; | ||
| fins; finTipChord; 0.018; 0.0005; | ||
| fins; finDistanceToCM; -0.906; 0.001; | ||
| parachute; CdSDrogue; 0.4537; 0.07; | ||
| parachute; lag_rec; 1; 0.5; | ||
| parachute; lag_se; 0.73; 0.16; | ||
| flight; inclination; 84.7; 1; | ||
| flight; heading; 53; 2; | ||
| flight; railLength; 5.7; 0.0005; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| attribute_class; parameter_name; mean_value; standard_deviation; | ||
| environment; ensembleMember; [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];; | ||
| motor; impulse; 1415.15; 35.3; | ||
| motor; burnOut; 5.274; 1; | ||
| motor; nozzleRadius; 0.021642; 0.0005; | ||
| motor; throatRadius; 0.008; 0.0005; | ||
| motor; grainSeparation; 0.006; 0.001; | ||
| motor; grainDensity; 1707; 50; | ||
| motor; grainOuterRadius; 0.0214; 0.2; | ||
| motor; grainInitialInnerRadius; .0097;0.000375; | ||
| motor; grainInitialHeight; 0.12; 0.001 | ||
| rocket; rocketMass; 8.257; 0.001; | ||
| rocket; inertiaI; 3.675; 0.03675; | ||
| rocket; inertiaZ; 0.007; 0.00007; | ||
| rocket; radius; 0.04045; 0.001; | ||
| rocket; distanceRocketNozzle; -1.024; .001; | ||
| rocket; distanceRocketPropellant; -0.51; 0.001; | ||
| rocket; powerOffDrag; 0.864857143; 0.03; | ||
| rocket; powerOnDrag; 0.864857143; 0.03; | ||
| rocket; noseLength; 0.274; 0.001; | ||
| rocket; noseDistanceToCM; 1.134; 0.001 | ||
| fins; finSpan; 0.077; 0.0005; | ||
| fins; finRootChord; 0.058; 0.0005; | ||
| fins; finTipChord; 0.018; 0.0005; | ||
| fins; finDistanceToCM; -0.906; 0.001; | ||
| parachute; CdSDrogue; 0.4537; 0.07; | ||
| parachute; lag_rec; 1; 0.5; | ||
| parachute; lag_se; 0.73; 0.16; | ||
| flight; inclination; 84.7; 1; | ||
| flight; heading; 53; 2; | ||
| flight; railLength; 5.7; 0.0005; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,30 @@ | ||
| from rocketpy import utilities | ||
| import numpy as np | ||
|
|
||
|
|
||
| def test_compute_CdS_from_drop_test(): | ||
| assert ( | ||
| utilities.compute_CdS_from_drop_test(31.064, 18, 1.0476) == 0.3492311157844522 | ||
| ) | ||
|
|
||
|
|
||
| def test_create__dispersion_dictionary(): | ||
| """Test if the function returns a dictionary with the correct keys. | ||
| It reads the keys from the dictionary generated by the utilities function | ||
| and compares them to the expected. | ||
| Be careful if you change the "fixtures/dispersion/Valetudo_inputs.csv" file. | ||
| """ | ||
|
|
||
| returned_dict = utilities.create_dispersion_dictionary( | ||
| "fixtures/dispersion/Valetudo_inputs.csv" | ||
| ) | ||
|
|
||
| test_dict = np.genfromtxt( | ||
| "fixtures/dispersion/Valetudo_inputs.csv", | ||
| usecols=(1, 2, 3), | ||
| skip_header=1, | ||
| delimiter=";", | ||
| dtype=str, | ||
| ) | ||
|
|
||
| assert returned_dict == test_dict |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.