# FLOW_FIELD

Specifies the flow field used in the problem.

AcuTrace Command

## Syntax

FLOW_FIELD {parameters}

## Qualifier

This command has no qualifier.

## Parameters

flow_field_type or mode (enumerated) [=static]
Type of AcuSolve flow data.
dynamic or transient
Transient flow.
cyclic_dynamic or cyclic
Cyclic flow.
pseudodynamic or pseudotransient
Pseudodynamic flow.
one_way_coupling
One way coupling with AcuSolve.
two_way_coupling
Two way coupling with AcuSolve.
from_run or run (integer) [=0]
Number of the AcuSolve run used to define the flow field. If from_run is set to 0, the last run in the working directory is assumed. Not used if flow_field_type is one_way_coupling or two_way_coupling.
from_directory or dir (string) [="ACUSIM.DIR"]
All internal files are read from or stored in this directory. This directory does not need to be on the same file system as the user-supplied input files.
from_problem or problem (string) [no default]
The name of the problem is specified via this option. This name is used to build internal file names and to generate output files. The names of all generated output files start with the problem name.
from_time_step or step (integer) [=0]
The time step used to define the flow data. If from_time_step is set to 0 the last time step of from_run in the working directory is assumed. Used only if flow_field_type is static or pseudodynamic.
time_step_type (enumerated) [=all]
The type of time step specification. Used only if flow_field_type is dynamic.
all
Use all available time steps.
time_step_series or series
Use a user-defined series of time steps.
cyclic_time_step_type (enumerated) [=range]
The type of time step specification. Used only if flow_field_type is cyclic_dynamic.
range
Use a range of time steps.
time_step_series or series
Use a user-defined series of time steps.
time_step_series or steps (array) [={}]
List of time step numbers defining the flow field. Used only if flow_field_type is dynamic and time_step_type is series or flow_field_type is cyclic_dynamic and cyclic_time_step_type is time_step_series.
first_cyclic_time_step or first_step (integer) [=0]
The first step number in a range of time steps. Used only if flow_field_type is cyclic_dynamic and cyclic_time_step_type is range.
last_cyclic_time_step or last_step (integer) [=0]
The last step number in a range of time steps. Used only if flow_field_type is cyclic_dynamic and cyclic_time_step_type is range.
cyclic_end_time_steps (enumerated) [=include_first]
The specification of how the end points of a cycle of steps are used. Used only if flow_field_type is cyclic_dynamic.
include_first
The flow data for the first step is used as the flow for the last step. The data for the last step is ignored.
include_last
The flow data for the last step is used as the flow for the first step. The data for the first step is ignored.
include_both
The flow data from both the first and the last steps are used.
average_both
The flow data at the cycle end points is the average of the first and last steps.
mesh_motion (boolean) [=on]
Flag specifying if mesh motion is active. Ignored if there is no mesh motion in the AcuSolve solution. Not used if flow_field_type is pseudodynamic.
pseudodynamic_mesh_update (enumerated) [=max_angle]
Flag specifying how often the mesh is rotated if flow_field_type is pseudodynamic. Flag specifying if mesh motion is active. Ignored if there is no mesh motion in the AcuSolve solution. Not used if flow_field_type is pseudodynamic.
pseudodynamic_time_increment (real) [=1]
The time between mesh update. Used only if flow_field_type is pseudodynamic and pseudodynamic_mesh_update is time_increment.
extended_flow_variables (list) [={} ]
List of extended variables in the AcuSolve database accessible to user equations.
coupling_socket_port (integer) [=20000]
Code port number for establishing socket connection to AcuSolve. Used only if flow_field_type is one_way_coupling.

## Description

The FLOW_FIELD command specifies the AcuSolve flow data used to advance the particle trace equations and defines how that data is used. AcuTrace can use flow data either from a completed AcuSolve simulation or from a concurrently running AcuSolve simulation.

For a completed AcuSolve simulation, there are up to four possible ways in which the flow data can be used.

When flow_field_type is steady, a single time step from a completed simulation is used to define a steady flow field with which to advance the particles. The particle simulation itself is of course transient because the particles are moving. By default, the last available step is used. This is generally the best practice, but any other step could be set with the step parameter, for example,
FLOW_FIELD {
...
flow_field_type = static
step            = 10
...
}
For dynamic flow, a set of time steps from an AcuSolve simulation is used to define a transient flow field. For particle times between time steps, the flow field is interpolated in time. Before the earliest time and after the last time, the flow field is extrapolated as constant in time. By default, all the steps from a transient solution are used. This is generally the best practice, but a subset of steps can be selected, for example,
FLOW_FIELD {
...
flow_field_type = dynamic
time_step_type  = series
steps           = { 2, 4, 6, 8 }
...
}

The cyclic flow field type defines a transient flow field in a similar manner, except that the flow repeats in time after the last time step is reached. This option is useful for tracing particles in time-periodic, for example, cyclic, flows in which the particle trace time is much greater than the flow cycle time because a relatively short flow simulation can be used. When using this option, one should be careful that the flow is indeed cyclic within a reasonable tolerance and that the set of time steps truly represents one or more complete flow cycles.

When cyclic_end_time_steps equals include_first, include_last, or average_both, the cycle time is the last time in the cycle minus the first time in the cycle. When cyclic_end_time_steps equals include_both, the cycle time is the last time in the cycle minus the first time in the cycle plus the difference between the last two steps in the cycle.

For example, for the command
FLOW_FIELD {
...
flow_field_type       = cyclic
cyclic_time_step_type = series
steps                 = { 1, 2, 3 }
...
}

and assuming the times of steps 1-3 are 10, 16, and 20, the cycle time is 20-10 = 10 when cyclic_end_time_steps equals include_first, include_last, or average_both, and 20-10 + (20 - 16) = 14 when cyclic_end_time_steps equals include_both.

When cyclic_end_time_steps equals include_first, include_last, or average_both, the flow fields at the first and last steps of the cycle are considered the same. When cyclic_end_time_steps equals include_first, the flow field from the first step is used; for the example above, the flow field used by AcuTrace would cycle 1, 2, 1, 2, and so on. When cyclic_end_time_steps equals include_last, the flow field from the last step is used; in the example, the flow field would cycle 2, 3, 2, 3, and so on. When cyclic_end_time_steps equals average_both, the flow field at the the cycle endpoint is the average of the fields at the first and last step; in the example, the flow field would cycle 2, average of 2 and 3, 2, average of 2 and 3, and so on. When cyclic_end_time_steps equals include_both, all steps in the cycle are used; in the example, the flow field would cycle 1, 2, 3, 1, 2, 3, and so on.

The AcuTrace times over the course of the cycle definition are used as is from the AcuSolve run. Outside the times of the cycle definition, the times map into the times in the cycle definition. For example, consider the following inputs:
FLOW_FIELD {
...
flow_field_type       = cyclic
cyclic_time_step_type = series
steps                 = { 100, 200, 300, 400, 500 }
cyclic_end_time_steps = include_both
...
}

and suppose that the times corresponding to these steps in the AcuSolve run are 10, 20, 30, 40, and 50. Then these same times are used in AcuTrace in the following way: at time 10 in the AcuTrace run, the flow field corresponds to the AcuSolve flow field at step 100, time 20 corresponds to step 200, and so on. Before time 10 or after time 50, the AcuSolve solution repeats: time 60 in the AcuTrace run uses the flow field from time 10 in the AcuSolve solution, time 70 uses the flow field from time 20, and so on. Note that time 0 uses the AcuSolve flow field at time 50.

When flow_field_type is pseudodynamic, a single step from an AcuSolve simulation with multiple reference frames is used to create a time varying flow field with mesh motion. Before particles are advanced, the boundaries between element sets with different reference frames are converted to sliding interface surfaces. As the particle trace advances, the mesh, flow velocity, and other flow variables in the non-stationary reference frames are rotated in time according to the reference frame definitions. The flow data so generated approximates the flow data that AcuSolve would produce for a truly dynamic simulation with mesh motion and sliding interface surfaces.

With pseudodynamic flow, the flow data and mesh do not update continuously but instead are updated at regular intervals, just as if the data were being read from a transient AcuSolve solution. If pseudodynamic_mesh_update equals time_increment, the update interval is simply the value of pseudodynamic_time_increment. If, on the other hand, pseudodynamic_mesh_update equals max_angle, the solution update interval is set to the time it takes the fastest rotating reference frame in the AcuSolve solution to rotate though an angle of pseudodynamic_max_angle. For example if there are two rotating reference frames in the AcuSolve solution with rotation speeds of 5 and 20 rpm, and pseudodynamic_max_angle equals 10, the update interval is set to 10/(360*20) * 60 = 1/12 second.

When flow_field_type is pseudodynamic, by default the last step of the simulation is used. This is generally the best practice. However, any other step could be set with the step parameter, for example,
FLOW_FIELD {
...
flow_field_type = pseudodynamic
step            = 10
...
}
The command
acuTrans -out -ts A -outv ,

will list the available steps in an AcuSolve run. Note there is a "," at the end of the command.

The flow data from a transient concurrently running AcuSolve simulation is used when flow_field_type is one_way_coupling. The particle trace is identical to what AcuTrace would compute with a flow_field_type of dynamic if the AcuSolve simulation first ran to completion. The advantage in using a flow_field type of one_way_coupling is that the AcuSolve disk requirements for long running particle traces in transient flow fields can be greatly reduced. One way coupling is also called unidirectional coupling.

When flow_field_type is two_way_coupling, the flow data from a transient concurrently running AcuSolve simulation is used as well. In addition, particle source terms and values are sent from AcuTrace to AcuSolve. The source terms and values sent as well as how AcuSolve uses them are specified in the COUPLING_FIELDS command. See the COUPLING_FIELDS section of this manual for more details. Two way coupling is also called bidirectional coupling.

The AcuSolve flow nodal output accessible to user equations always includes flow velocity, pressure, temperature, eddy viscosity, species and velocity gradient. In addition, some or all of the available extended nodal output values can be made accessible through the extended_flow_variables parameter. For example,

extended_flow_variables = { "material_viscosity", "strain_rate_invariant_2" }

makes material viscosity and the second strain rate invariant available for user equations. To use extended output values in AcuTrace, you should make sure that the proper AcuSolve commands are used in setting up the AcuSolve run providing the data to AcuTrace. The nodal output values available in an existing AcuSolve run can be determined by executing:
acuTrans -out -extout -to stats

By default, AcuTrace uses nodal mesh displacements if they are provided in the AcuSolve database. It is possible to ignore these, for example set them to 0, by setting the parameter mesh_motion to off. This is not recommended, however. If there are no mesh displacements, a value of on for mesh_motion is ignored. The mesh_motion parameter is ignored if the flow_field_type is pseudodynamic.