combine_bd_wake_comp
Module Contents
Classes
combine bd and wake coords for the BS evaluation of the wake rollup |
Functions
|
- class combine_bd_wake_comp.BdnWakeCombine(**kwargs)
Bases:
csdl.Modelcombine bd and wake coords for the BS evaluation of the wake rollup wake_vel = BS(wake_coords, bsnwake) @ gamma_w
- Parameters
- S
angular_vel[1,] rad/sec bd_vtx_coords[num_evel_pts_x, num_evel_pts_y, 3] : csdl array
- Returns
- kinematic_vel[n_wake_pts_chord, num_evel_pts_x, num_evel_pts_y, 3]csdl array
Induced velocities at found along the 3/4 chord.
- define()
User defined method to define runtime behavior. Note: the user never _calls_ this method. Only the Simulator class constructor calls this method.
Example
- def define(self):
self.create_input(‘x’) m = 5 b = 3 y = m*x + b self.register_output(‘y’, y)
# compile using Simulator imported from back end… sim = Simulator(Example()) sim[‘x’] = -3/5 sim.run() print(sim[‘y’]) # expect 0 ```
- initialize()
User defined method to declare parameter values. Parameters are compile time constants (neither inputs nor outputs to the model) and cannot be updated at runtime. Parameters are intended to make a Model subclass definition generic, and therefore reusable. The example below shows how a Model subclass definition uses parameters and how the user can set parameters when constructing the example Model subclass.
Example
- def initialize(self):
self.parameters.declare(‘num_times’, types=int) self.parameters.declare(‘step_size’, types=float) self.parameters.declare(‘surface’, types=dict)
- def define(self):
num_times = self.parameters[‘num_times’] step_size = self.parameters[‘step_size’] surface = self.parameters[‘surface’] name = surface[‘name’] # str symmetry = surface[‘symmetry’] # bool mesh = surface[‘mesh’] # numpy array
# define runtime behavior…
- surface = {
‘name’: ‘wing’, ‘symmetry’: False, ‘mesh’: mesh,
}
# compile using Simulator imported from back end… sim = Simulator(
- Example(
num_times=100, step_size=0.1, surface=surface,
),
)
- combine_bd_wake_comp.generate_simple_mesh(nx, ny, n_wake_pts_chord=None, delta_y=0)