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
import numpy as np | |
from matplotlib import pyplot as plt | |
import openmdao.api as om | |
def rotations(theta): | |
# define rotation matrices per http://web.mit.edu/course/3/3.11/www/modules/laminates.pdf | |
s = np.sin(theta) | |
c = np.cos(theta) | |
# stress in fiber axis = A * stress in xy axis |
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
import numpy as np | |
from matplotlib import pyplot as plt | |
import openmdao.api as om | |
def rotations(theta): | |
# define rotation matrices per http://web.mit.edu/course/3/3.11/www/modules/laminates.pdf | |
s = np.sin(theta) | |
c = np.cos(theta) | |
# stress in fiber axis = A * stress in xy axis |
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
import openmdao.api as om | |
class MyGroupAsteriskFirst(om.Group): | |
def setup(self): | |
self.add_subsystem('foo', om.IndepVarComp('thrust', val=2.0), promotes_outputs=['*']) | |
self.add_subsystem('blah', om.ExecComp('a=b+c',a={'units':'kg','value':1},b={'units':'kg','value':1},c={'units':'kg','value':1}), promotes_inputs=['*',('c','thrust')]) | |
class MyGroupAsteriskLast(om.Group): | |
def setup(self): |
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
class SimpleHose(om.ExplicitComponent): | |
""" | |
A coolant hose used to track pressure drop and weight in long hose runs. | |
Inputs | |
------ | |
hose_diameter : float | |
Inner diameter of the hose (scalar, m) | |
hose_length | |
Length of the hose (scalar, m) |
OlderNewer