compute_wake_kinematic_vel_temp

Module Contents

Classes

ComputeWakeKinematicVel

Compute various geometric properties for VLM analysis.

class compute_wake_kinematic_vel_temp.ComputeWakeKinematicVel(**kwargs)

Bases: csdl.Model

Compute various geometric properties for VLM analysis. These are used primarily to help compute postprocessing quantities, such as wave CD, viscous CD, etc. Some of the quantities, like normals, are used to compute the RHS of the AIC linear system. A gamma_b = b - M gamma_w parameters ———-

collocation_pts[num_vortex_panel_x*num_vortex_panel_y]csdl array

all the bd vertices collocation_pts

wake_pts[num_vortex_panel_x*num_vortex_panel_y]csdl array

all the wake panel collcation pts

wake_circulations[num_wake_panel]csdl array

a concatenate vector of the wake circulation strength

Returns

vel_col_w[num_evel_pts_x*num_vortex_panel_x* num_evel_pts_y*num_vortex_panel_y,3] csdl array

the velocities computed using the aic_col_w from biot svart’s law on bound vertices collcation pts induces by the wakes

define()

User defined method to define runtime behavior. Note: the user never _calls_ this method. Only the Simulator class constructor calls this method.

Example

```py class Example(Model):

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

```py class Example(Model):

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,

),

)

```