ansys.dyna.core.pre.dynaicfd#

Module for creating an ICFD (incompressible computational fluid dynamics) DYNA input deck.

Classes#

DynaICFD

Contains methods for create a keyword related to an ICFD analysis.

ICFD_SurfRemeshMethod

Generic enumeration.

ICFD_AnalysisType

Generic enumeration.

ICFD_MessageLevel

Generic enumeration.

ICFD_CouplingForm

Generic enumeration.

ICFD_CouplingDirection

Generic enumeration.

ICFDAnalysis

Activates an ICFD analysis and defines associated control parameters.

Compressible

Generic enumeration.

MatICFD

Defines physical properties for the fluid material.

ICFDDOF

Generic enumeration.

Vel

Generic enumeration.

ICFDPart

Defines a part for the ICFD solver.

ICFDVolumePart

Assigns material properties to the nodes enclosed by surface ICFD parts.

MeshedVolume

Defines the volume space to mesh.

Module Contents#

class ansys.dyna.core.pre.dynaicfd.DynaICFD[source]#

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

Contains methods for create a keyword related to an ICFD analysis.

timestep = 0[source]#
termination = 1e+28[source]#
set_termination(termination_time)[source]#

Set the total time of the simulation for the fluid problem.

Parameters:
termination_timefloat

Total time of the simulation for the fluid problem.

create_control_general(atype=0, mtype=0, dvcl=0, rdvcl=0)[source]#

Specify the type of CFD analysis.

Parameters:
atypeint, optional

Analysis type. The default is 0.

mtypeint, optional

Solving method type. The default is 0.

dvclint, optional

Flag for divergence cleaning. The default is 0.

rdvclint, optional

Flag for remeshing divergence cleaning. The default is 0.

Returns:
bool

True when successful, False when failed.

create_control_output(msgl)[source]#

Modify default values for screen and file outputs related to the fluid solver only.

Parameters:
msglint

Message level.

Returns:
bool

True when successful, False when failed.

create_control_turbulence(tmod)[source]#

Modify the default values for the turbulence model.

Parameters:
tmodint

Turbulence model to use.

Returns:
bool

True when successful, False when failed.

create_control_dem_coupling(ctype=0, bt=0, dt=1e+28, sf=1)[source]#

Activate coupling between the ICFD and DEM solvers.

Parameters:
ctypeint, optional

Coupling direction to the solver. The default is 0.

btfloat, optional

Birth time for the DEM coupling. The default is 0.

dtfloat, optional

Death time for the DEM coupling. The default is 1e28.

sffloat, optional

Scale factor to apply to the force transmitted by the fluid to the structure. The default is 1.

Returns:
bool

True when successful, False when failed.

create_section_icfd(sid)[source]#

Define a section for the ICFD solver.

Parameters:
sidint

Section ID.

Returns:
bool

True when successful, False when failed.

create_part_icfd(pid, secid, mid)[source]#

Define parts for the ICFD solver.

Parameters:
pidint

Part ID for fluid surfaces.

secidint

Section ID defined with the \*ICFD_SECTION card.

midint

Material ID defined with the \*ICFD_MAT card.

Returns:
bool

True when successful, False when failed.

create_solver_tol_mmov(atol=1e-08, rtol=1e-08)[source]#

Change the default tolerance values for the mesh movement algorithm.

Parameters:
atolfloat, optional

Absolute convergence criteria. The default is 1e-8.

rtolfloat, optional

Relative convergence criteria. The default is 1e-8.

Returns:
bool

True when successful, False when failed.

set_initial(velocity=Velocity(0, 0, 0), temperature=0, pressure=0)[source]#

Assign the initial condition to all nodes at once.

Parameters:
velocityVelocity, optional

Initial velocity. The default is (0, 0, 0),

temperaturefloat, optional

Initial temperature. The default is 0.

pressurefloat, optional

Initial pressure. The default is 0.

set_imposed_move(vx=None, vy=None, vz=None)[source]#

Impose a velocity on the whole volume mesh.

Parameters:
vx
vy
save_file()[source]#

Save keyword files.

class ansys.dyna.core.pre.dynaicfd.ICFD_SurfRemeshMethod[source]#

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

Generic enumeration.

Derive from this class to define new enumerations.

LAPLACIAN_SMOOTHING = 1[source]#
CURVATURE_PRESERVING = 2[source]#
class ansys.dyna.core.pre.dynaicfd.ICFD_AnalysisType[source]#

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

Generic enumeration.

Derive from this class to define new enumerations.

TURNOFF_ICFD_SOLVER[source]#
TRANSIENT_ANALYSIS = 0[source]#
STEADY_STATE_ANALYSIS = 1[source]#
class ansys.dyna.core.pre.dynaicfd.ICFD_MessageLevel[source]#

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

Generic enumeration.

Derive from this class to define new enumerations.

TIMESTEP_INFORMATION = 0[source]#
FULL_OUTPUT_INFORMATION = 4[source]#
class ansys.dyna.core.pre.dynaicfd.ICFD_CouplingForm[source]#

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

Generic enumeration.

Derive from this class to define new enumerations.

FORCE_BASED_ON_VELOCITY_DRAG_VALUE = 0[source]#
FORCE_USING_FLUID_PRESSURE_GRADIENT = 1[source]#
class ansys.dyna.core.pre.dynaicfd.ICFD_CouplingDirection[source]#

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

Generic enumeration.

Derive from this class to define new enumerations.

TWO_WAY_COUPLING = 0[source]#
ONE_WAY_COUPLING_MECHANICS_TRANS_DISPLACEMENT_TO_FLUID = 1[source]#
ONE_WAY_COUPLING_FLUID_TRANS_STRESS_TO_SOLID = 2[source]#
TWO_WAY_WEAK_COUPLING = 3[source]#
class ansys.dyna.core.pre.dynaicfd.ICFDAnalysis[source]#

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

Activates an ICFD analysis and defines associated control parameters.

defined_timestep = False[source]#
defined_volumemesh = False[source]#
defined_surfmesh = False[source]#
defined_type = False[source]#
defined_output = False[source]#
defined_fsi = False[source]#
defined_steady_state = False[source]#
defined_coupling_dem = False[source]#
defined_mesh_adapt = False[source]#
stub[source]#
type = 'analysis_icfd'[source]#
set_type(analysis_type=ICFD_AnalysisType.TRANSIENT_ANALYSIS)[source]#

Set the type of the CFD analysis.

Parameters:
analysis_typeICFD_AnalysisType

Analysis type. The default is TRANSIENT_ANALYSIS.

set_output(messagelevel=ICFD_MessageLevel.TIMESTEP_INFORMATION, iteration_interval=0)[source]#

Modify default values for screen and file outputs related to the fluid solver only.

Parameters:
messagelevelICFD_MessageLevel, optional

Message level. The default is TIMESTEP_INFORMATION.

iteration_intervalint, optional

Iteration interval to print the output at. The default is 0.

set_fsi(couplingdir=ICFD_CouplingDirection.TWO_WAY_COUPLING)[source]#

Modify default values for the fluid-structure interaction coupling algorithm.

Parameters:
couplingdirICFD_CouplingDirection, optional

Coupling direction to the solver. The default is TWO_WAY_COUPLING.

set_steady_state(max_iteration=1000000.0, momentum_tol_limit=0.001, pressure_tol_limit=0.001, temperature_tol_limit=0.001, velocity_relax_param=0.3, pressure_relax_param=0.7)[source]#

Set convergence options for the steady state solver.

Parameters:
max_iterationint, optional

Maximum number of iterations to reach convergence. The default is 1000000.0.

momentum_tol_limitfloat, optional

Tolerance limits for the momentum equations. The default is 0.001.

pressure_tol_limitfloat, optional

Tolerance limits for the pressure equations. The default is 0.001.

temperature_tol_limitfloat, optional

Tolerance limits for the temperature equations. The default is 0.001.

velocity_relax_paramfloat, optional

Relaxation parameters for the velocity. The default is 0.3.

pressure_relax_paramfloat, optional

Relaxation parameters for the pressure. The default is 0.7.

set_timestep(timestep=0)[source]#

Set the time step for the fluid problem.

Parameters:
dtfloat, optional

Time step for the fluid problem. The default is 0.

set_volume_mesh(mesh_growth_scale_factor=1.41)[source]#

Modify the default value for automatic volume mesh generation.

Parameters:
mesh_growth_scale_factorfloat, optional

Maximum mesh size that the volume mesher is allowed to use when generating the volume mesh. The default is 1.41.

set_mesh_adaptivity(min_mesh_size=0, max_mesh_size=0, max_perceptual_error=0, num_iteration=0)[source]#

Activate the adaptive mesh refinement feature.

Parameters:
min_mesh_sizefloat, optional

Minimum mesh size for the mesh generator. The default is 0.

max_mesh_sizefloat, optional

Maximum mesh size. The default is 0.

max_perceptual_errorfloat, optional

Maximum perceptual error allowed in the whole domain. The default is 0.

num_iterationint, optional

Number of iterations before a forced remeshing. The default is 0.

set_surface_mesh(remesh_method=ICFD_SurfRemeshMethod.LAPLACIAN_SMOOTHING)[source]#

Enable automatic surface remeshing.

Parameters:
remesh_methodICFD_SurfRemeshMethod, optional

Whether to perform a surface remeshing. The default is LAPLACIAN_SMOOTHING.

set_coupling_dem(coupling_type=0, birth_time=0, death_time=1e+28, scale_factor=1, formulation=ICFD_CouplingForm.FORCE_BASED_ON_VELOCITY_DRAG_VALUE)[source]#

Activate coupling between the ICFD and DEM solvers.

Parameters:
coupling_typeint, optional

Coupling direction to the solver. The default is 0.

birth_timefloat, optional

Birth time for the DEM coupling. The default is 0.

death_timefloat, optional

Death time for the DEM coupling. The default is 1e+28.

scale_factorfloat, optional

Scale factor applied to the force transmitted by the fluid to the structure. The default is 1.

formulationint, optional

Type of formulation to use in the coupling. The default is FORCE_BASED_ON_VELOCITY_DRAG_VALUE.

create()[source]#

Create ICFD analysis.

class ansys.dyna.core.pre.dynaicfd.Compressible[source]#

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

Generic enumeration.

Derive from this class to define new enumerations.

VACUUM = 0[source]#
FULLY_INCOMPRESSIBLE_FLUID = 1[source]#
class ansys.dyna.core.pre.dynaicfd.MatICFD(flag=Compressible.FULLY_INCOMPRESSIBLE_FLUID, flow_density=0, dynamic_viscosity=0, heat_capacity=0, thermal_conductivity=0, thermal_expansion_coefficient=0)[source]#

Defines physical properties for the fluid material.

Parameters:
flagint

Flag for chooseing between fully incompressible, slightly compressible, or barotropic flows. The default is FULLY_INCOMPRESSIBLE_FLUID. Options are:

  • EQ.0: Vacuum (free surface problems only)

  • EQ.1: Fully incompressible fluid

flow_densityfloat, optional

Flow density. The default is 0.

dynamic_viscosityfloat, optional

Dynamic viscosity. The default is 0.

heat_capacity
thermal_conductivity
thremal_expansion_coefficent
stub[source]#
flag[source]#
flow_density[source]#
dynamic_viscosity[source]#
hc[source]#
tc[source]#
beta[source]#
create(stub)[source]#

Create an ICFD material.

class ansys.dyna.core.pre.dynaicfd.ICFDDOF[source]#

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

Generic enumeration.

Derive from this class to define new enumerations.

X = 1[source]#
Y = 2[source]#
Z = 3[source]#
class ansys.dyna.core.pre.dynaicfd.Vel[source]#

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

Generic enumeration.

Derive from this class to define new enumerations.

LINEAR_VELOCITY = 1[source]#
ANGULAR_VELOCITY = 2[source]#
class ansys.dyna.core.pre.dynaicfd.ICFDPart(id)[source]#

Defines a part for the ICFD solver.

stub[source]#
type = 'ICFD'[source]#
id[source]#
secid = 1[source]#
mid = 0[source]#
set_material(mat)[source]#

Set a material.

set_prescribed_velocity(motion, dof=ICFDDOF.X, velocity_flag=Vel.LINEAR_VELOCITY)[source]#

Impose the fluid velocity on the boundary.

Parameters:
dofint, optional

Applicable degrees of freedom. The default is ICFDDOF.X. Options are:

  • EQ.1: x-degree of freedom

  • EQ.2: y-degree of freedom

  • EQ.3: z-degree of freedom

  • EQ.4: Normal direction degree of freedom

velocity_flagint, optional

Velocity flag. The default is LINEAR_VELOCITY. Options are:

  • EQ.1: Linear velocity

  • EQ.2: Angular velocity

  • EQ.3: Parabolic velocity profile

  • EQ.4: Activates synthetic turbulent field on part

set_prescribed_pressure(pressure)[source]#

Impose a fluid pressure on the boundary.

Parameters:
pressureCurve

Load curve to describe the pressure value versus time.

set_prescribed_temperature(temperature)[source]#

Impose a fluid temperature on the boundary.

Parameters:
temperatureCurve

Load curve to describe the temperature value versus time.

set_free_slip()[source]#

Specify the fluid boundary with a free-slip boundary condition.

set_non_slip()[source]#

Specify the fluid boundary with a non-slip boundary condition.

set_fsi()[source]#

Define the fluid surface to consider in contact with the solid surfaces for fluid-structure interaction (FSI) analysis.

compute_drag_force()[source]#

Enable the computation of drag forces over given surface parts of the model.

compute_flux()[source]#

Enable the computation of the flow rate and average pressure over given parts of the model.

compute_temperature()[source]#

Enable the computation of the average temperature and the heat flux over given parts of the model.

set_boundary_layer(number=3)[source]#

Define a boundary layer mesh as a refinement on the volume mesh.

Parameters:
numberint, optional

Number of elements normal to the surface (in the boundary layer). The default is 3.

set_boundary_layer_symmetry_condition()[source]#

Specify the part that is to have symmetry conditions for the boundary layer.

set_imposed_move(vx=None, vy=None, vz=None)[source]#

Impose a velocity on a specific ICFD part.

Parameters:
vx
vy
vz
set_property()[source]#

Set properties for an ICFD part.

class ansys.dyna.core.pre.dynaicfd.ICFDVolumePart(surfaces)[source]#

Assigns material properties to the nodes enclosed by surface ICFD parts.

Parameters:
surfaceslist

List of part IDs for the surface elements that define the volume mesh.

stub[source]#
type = 'ICFDVOLUME'[source]#
id[source]#
secid = 1[source]#
mid = 0[source]#
surfaces[source]#
defined_imposed_move = False[source]#
set_material(mat)[source]#

Set a material.

set_imposed_move(vx=None, vy=None, vz=None)[source]#

Impose a velocity on a specific ICFD part.

Parameters:
vx
vy
vz
create()[source]#

Create an ICFD volume part.

class ansys.dyna.core.pre.dynaicfd.MeshedVolume(surfaces)[source]#

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

Defines the volume space to mesh.

Parameters:
surfaceslist

List of part IDs for the surface elements to use to define the volume.

surfaces[source]#
stub[source]#
meshsizeshape = [][source]#
embeded_surf = [][source]#
meshsize_surf = [][source]#
fluid_interfaces = [][source]#
type = 'meshedvolume'[source]#
embed_shell(embeded)[source]#

Define surfaces that the mesher is to embed inside the volume mesh.

Parameters:
embededlist

List of part IDs for the surface elements.

meshsize_box(size, min_point, max_point)[source]#

Define a local mesh size in specific zones corresponding to given geometrical shapes.

Parameters:
sizefloat

Mesh size to apply in the zone of the shape defined by SNAME.

parameterlist

List of the parameters that define the shape.

set_meshsize(surfaces)[source]#

Define the surfaces that the mesher is to use to specify a local mesh size inside the volume.

Parameters:
surfaceslist

List of part IDs for the surface elements.

set_fluid_interfaces(surfaces)[source]#

Define the surfaces that the mesher is to use to specify fluid interfaces in multi-fluid simulations.

Parameters:
surfaceslist

List of part IDs for the surface elements.

create()[source]#

Create mesh volume.