itasca.cfdarray

Array interface for CFD.

Functions

itasca.cfdarray.create_mesh(nodes: array float{nnodes, 3}, elements: array int{nelem, 8}) → None.

Create a cfd mesh. The indices in the array elem should index the node locations in the array node. Counting begins at 0.

itasca.cfdarray.density() → array float{element}.

Get a numpy array of the cfd element fluid density.

itasca.cfdarray.drag() → array float{3,element}.

Get a numpy array of the cfd element fluid drag force.

itasca.cfdarray.extra(slot: int) → array float{CFD element} or float{CFD element,3}.

Get the CFD element extra data in the given slot as an array. Extra variables accessed by array must be of type float or vec.

itasca.cfdarray.fill_pos(data: array float{CFD element, 3}) → None.

Fill an existing array with the CFD element centroid location. The array must be the correct shape.

itasca.cfdarray.fill_pressure(data: array float{element}) → None.

Fill an existing array with the cfd element fluid pressure. The array must be the correct shape.

itasca.cfdarray.ids() → array int{CFD element}.

Get the CFD element ids as an array.

itasca.cfdarray.in_group(group_name: str, slot=1) → array bool{CFD element}.

Return CFD element group membership as a Boolean array.

itasca.cfdarray.porosity() → array float{element}.

Get a numpy array of the cfd element fluid porosity.

itasca.cfdarray.pos() → array float{CFD element,3}.

Get a numpy array of the CFD element centroid location.

itasca.cfdarray.pressure() → array float{element}.

Get a numpy array of the cfd element fluid pressure.

itasca.cfdarray.pressure_gradient() → array float{3,element}.

Get a numpy array of the cfd element fluid pressure gradient.

itasca.cfdarray.set_density(data: array float{element}) → None.

Set the cfd element density from an array.

itasca.cfdarray.set_drag(data: array float{3, element}) → None.

Set the cfd element fluid drag force.

itasca.cfdarray.set_extra(slot: int, data: array float{CFD element} or float{CFD element, 3}) → None.

Set the CFD element extra data in the given slot with an array. Extra variables set by array must be of type float or vec.

itasca.cfdarray.set_group(membership: array bool{CFD element}, group_name: str, slot=1) → None.

Set CFD element group from an array. Where membership True set the corresponding CFD element to be a member of group group_name in the given slot.

itasca.cfdarray.set_porosity(data: array float{element}) → None.

Set the cfd element porosity from an array.

itasca.cfdarray.set_pressure(data: array float{element}) → None.

Set the cfd element fluid pressure from an array.

itasca.cfdarray.set_pressure_gradient(data: array float{3, element}) → None.

Set the cfd element fluid pressure gradient.

itasca.cfdarray.set_velocity(data: array float{3, element}) → None.

Set the cfd element fluid velocity.

itasca.cfdarray.set_viscosity(data: array float{element}) → None.

Set the cfd element viscosity from an array.

itasca.cfdarray.velocity() → array float{3,element}.

Get a numpy array of the cfd element fluid velocity.

itasca.cfdarray.viscosity() → array float{element}.

Get a numpy array of the cfd element fluid viscosity.

itasca.cfdarray.volume() → array float{element}.

Get a numpy array of the cfd element volume.