-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Now there is a _ShockFactory which returns a _ShockClass object depending on the given parameters. From _ShockFactory doctests: >>> ss1 = Shock(M_1=1.5) # Given upstream Mach number (default beta = 90°) >>> ss1.M_2 0.70108874169309943 >>> ss1.beta 1.5707963267948966 >>> ss1.theta 0.0 >>> ss2 = Shock(M_1=3.0, theta=np.radians(20.0), weak=True) >>> ss2.beta # Notice it is an oblique shock 0.6590997534071927 This is much cleaner now, and the approach can be extended to other kind of objects.
- Loading branch information
1 parent
3a9153e
commit 49d1379
Showing
2 changed files
with
76 additions
and
107 deletions.
There are no files selected for viewing
This file contains 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 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