ansys.dyna.core.pre.dynaisph#

Module for creating an ISPH (incompressible smooth particle hydrodynamics) DYNA input deck.

Classes#

DynaISPH

Contains methods for creating a keyword related to ISPH.

ISPHAnalysis

Provide controls related to ISPH.

SPHSection

Defines section properties for ISPH particles.

MassflowPlane

Measures ISPH mass flow rate across a defined plane.

ISPHFluidPart

Generates ISPH particles inside a box.

ISPHStructPart

Generates and places ISPH elements on the surface of triangular shell elements.

Module Contents#

class ansys.dyna.core.pre.dynaisph.DynaISPH[source]#

Bases: ansys.dyna.core.pre.dynabase.DynaBase

Contains methods for creating a keyword related to ISPH.

isphanalysis[source]#
set_des(num_timestep=1, boxid=0, space_dimension=3, neighbors=150, approximation_theory=0, max_velocty=1000000000000000.0)[source]#

Provide controls related to ISPH.

Parameters:
num_timestepint, optional

Number of time steps between particle sorting. The default is 1.

boxidint, optional

Box ID. The default is 0. ISPH approximations are computed inside the specified box. When a particle has gone outside this box, it is deactivated.

space_dimensionint, optional

Space dimension for ISPH particles. The default is 3. Options are:

  • EQ.3: 3D problems

  • EQ.2: 2D plane strain problems

  • EQ.-2: 2D axisymmetric problems

neighborsint, optional

Initial number of neighbors per particle. The default is 150.

approximation_theoryint, optional

Particle approximation theory. The default is 0.

max_veloctyfloat, optional

Maximum value for velocity for the ISPH particles. The default is 1000000000000000.0.

Returns:
bool

True when successful, False when failed.

save_file()[source]#

Save keyword files.

Returns:
bool

True when successful, False when failed.

class ansys.dyna.core.pre.dynaisph.ISPHAnalysis(num_timestep=1)[source]#

Provide controls related to ISPH.

stub[source]#
num_timestep[source]#
box = None[source]#
space_dimension = 3[source]#
neighbors = 150[source]#
approximation_theory = 13[source]#
particle_deactivation = 1000000000000000.0[source]#
velocity_scaling = 0[source]#
set_num_timestep(num_timestep)[source]#

Set the number of time steps between particle sorting.

Parameters:
num_timestepint, optional

Number of time steps between particle sorting. The default is 1.

set_box(box)[source]#

Set the box. ISPH approximations are computed inside a specified box.

Parameters:
boxBox

Box for computing ISHPH approximattions. When a particle has gone outside this box, it is deactivated.

set_neighbors(neighbors)[source]#

Set the initial number of neighbors per particle.

Parameters:
neighborsint, optional

Initial number of neighbors per particle.

set_particle_deactivation(deactivation)[source]#

Set the type of BEM matrices and the way they are assembled.

Parameters:
deactivation
set_velocity_scaling(scaling)[source]#

Set the type of BEM matrices and the way they are assembled.

Parameters:
scaling
create()[source]#

Create an ISPH analysis.

class ansys.dyna.core.pre.dynaisph.SPHSection(cslh=1.2, hmin=0.2, hmax=2.0, sphini=0)[source]#

Defines section properties for ISPH particles.

Parameters:
cslhfloat, optional
hminfloat, optional
hmaxfloat, optional
sphiniint, optional
id[source]#
class ansys.dyna.core.pre.dynaisph.MassflowPlane(particles, surface)[source]#

Measures ISPH mass flow rate across a defined plane.

Parameters:
particlesNodeSet, PartSet

Node set or part set specifying the ISPH particles to measure.

surfacePartSet

Part set ID or part ID defining the surface across which to measure the flow rate.

particles[source]#
surface[source]#
create(stub)[source]#

Create a mass flow plane.

class ansys.dyna.core.pre.dynaisph.ISPHFluidPart(pid, minpoint, length, numdirx, numdiry, numdirz)[source]#

Bases: ansys.dyna.core.pre.dynabase.Part

Generates ISPH particles inside a box.

Parameters:
pidint

Part ID.

minpointPoint

Minimum x,y,z-coordinate.

lengthPoint

Box length in the x,y,z-direction.

numdirxint

Number of ISPH particles in the x-direction.

numdiryint

Number of ISPH particles in the y-direction.

numdirzint

Number of ISPH particles in the z-direction.

stub[source]#
type = 'ISPHFLUID'[source]#
minpoint[source]#
length[source]#
numdirx[source]#
numdiry[source]#
numdirz[source]#
cslh = 1.2[source]#
hmin = 0.2[source]#
hmax = 2.0[source]#
sphini = 0[source]#
massflowplane = None[source]#
set_smoothing_length(initial, min, max, optional)[source]#

Calculate the smoothing length of the particles.

Parameters:
initialfloat

Constant for calculating the initial smoothing length of the particles.

minfloat

Scale factor for the minimum smoothing length.

maxfloat

Scale factor for the maximum smoothing length.

optionalfloat, optional

Initial smoothing length, which overrides the true smoothing length.

create_particles()[source]#

Create ISPH particles inside the box.

create_massflow_plane(surfaces)[source]#

Measure ISPH mass flow rate across a defined plane.

set_property()[source]#

Set properties for an ISPH fluid part.

class ansys.dyna.core.pre.dynaisph.ISPHStructPart(pid, couple_partset, space)[source]#

Bases: ansys.dyna.core.pre.dynabase.Part

Generates and places ISPH elements on the surface of triangular shell elements.

Parameters:
pidint

Part ID.

couple_partsetPartSet

Part or part set ID for the region of the mesh to place the ISPH elements on.

spacefloat

Maximum space between ISPH elements.

stub[source]#
type = 'ISPHSTRUCT'[source]#
couple_partset[source]#
space[source]#
cslh = 1.2[source]#
hmin = 0.2[source]#
hmax = 2.0[source]#
sphini = 0[source]#
set_smoothing_length(initial, min, max, optional)[source]#

Calculate the smoothing length of the particles.

Parameters:
Parameters
———-
initialfloat

Constant for calculating the initial smoothing length of the particles.

minfloat

Scale factor for the minimum smoothing length.

maxfloat

Scale factor for the maximum smoothing length.

optionalfloat, optional

Initial smoothing length, which overrides the true smoothing length.

create_particles()[source]#

Create ISPH elements on the surface of triangular shell elements.

set_property()[source]#

Set properties for the ISPH structural part.