-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
101 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import os | ||
import sys | ||
import subprocess as sbp | ||
import numpy as np | ||
import pprint as pp | ||
import msm | ||
import msmio as mio | ||
import msmsg as msg | ||
import msmbeam as msb | ||
import utilities as utl | ||
|
||
|
||
def plotBlade(): | ||
blade = msb.Beam() | ||
blade.readPreGEBTIn(sys.argv[1]) | ||
for i, st in enumerate(blade.stations): | ||
cs = st['cross_section'] | ||
cs.readPreVABSIn(st['section'] + '.temp.xml', '', '') | ||
|
||
if i in [2, 3, 4]: | ||
cs.name_baseline = 'vr7_baselines_' + str(i) | ||
else: | ||
cs.name_baseline = 'vr7_baselines' | ||
cs.name_layup = 'vr7_layups' | ||
cs.pitch = st['pitch'] | ||
# Set obliqueness | ||
sw = st['sweep'] | ||
cos11 = np.cos(np.deg2rad(sw)) | ||
cos21 = np.cos(np.deg2rad(sw + 90.)) | ||
cs.cos11 = utl.floorAbsolute(cos11 * 1e6) * 1e-6 | ||
cs.cos21 = utl.floorAbsolute(cos21 * 1e6) * 1e-6 | ||
|
||
cs.updateXMLElementTree('h') | ||
|
||
# Write new PreVABS input | ||
cs.writePreVABSIn(cs.name + '.xml') | ||
msm.run('prevabs', cs.name+'.xml', '-h', '-vabs') | ||
|
||
# Read nodes and elements | ||
cs.readVABSIn() | ||
blade.writeGmshMsh() | ||
|
||
|
||
if __name__ == "__main__": | ||
plotBlade() |