fix dragforce/field command
fix dragforce/field/transient command
Warning
Warning
This command is deprecated, please use enable_one_way_coupling instead.
Syntax
fix ID group-ID dragforce/field[/transient] style_keyword style_values region region-ID field_keyword field_value [transient_field_keyword transient_field_value] ...
ID, group-ID are documented in fix command
dragforce = style name of this fix command
style_keyword = Schiller_Naumann or const_Cd
Schiller_Naumann style_values = fluid_viscosity viscosity-value fluid_density density-value fluid_viscosity = obligatory word viscosity-value = kinematic fluid density in length^2/time units fluid_density = obligatory word (Unless 'use_density_field' is used. See description below.) density-value = fluid density in mass/length^3 units const_Cd style_values = Cd Cd-value fluid_viscosity viscosity-value fluid_density density-value Cd = obligatory word Cd-value = value of drag coefficient (dimensionless) fluid_viscosity = obligatory word viscosity-value = kinematic fluid viscosity in length^2/time units fluid_density = obligatory word density-value = fluid density in mass/length^3 units
region = obligatory keyword
region-ID = ID of region atoms must be in to have added drag force
zero or more field keyword/value pairs may be appended to args
field keyword = binsize or check_mesh or file or file_coords or interpolate or interpolateRun or attenuate or MRF_region or MRF_angular_velocity
binsize value = bsize bsize = size of bins for structured grid used (length units) check_mesh value = check_mesh flag if mesh size of specified field should be checked against particle diameter regular_mesh value = regular_mesh flag if the fields are specified on a regular (cuboid) mesh or not file value = filename - not for dragforce/field/transient filename = filename for reading flow velocity field data (string) file_coords value = filename_coords filename_coords = filename to write coordinate data of grid cells (string) use_density_field value = 'yes' or 'no' yes,no = determines if a density field file is used to determine the local fluid density or if a constant value is defined via 'fluid_density'. If 'yes', then 'file_rho' must be defined. file_rho value = filename - not for dragforce/field/transient filename = filename for reading flow density field data (string) interpolate value = 'yes' or 'no' yes,no = determines if file is treated as exact representation of the internal mesh or values are interpolated interpolateRun value = 'yes' or 'no' yes,no = determines if field values are interpolated linearly to the particle position or if the bin values are used as they are (first order accurate "interpolation") attenuate value = attenuation-value attenuation-value = the drag is scaled by this coefficient before computation of the drag force MRF_region value = MRF region name MRF region name = the region's id in which to apply the MRF mapping MRF_angular_velocity value = angular velocity angular velocity = angular velocity of the rotating MRF region
for fix dragforce/field/transient, the following field keyword/value pairs can be appended:
sequence_file = obligatory keyword sequence_file_name = name of flow field sequence file is_periodic_in_time = optional keyword is_periodic = yes or no
Examples
fix drag all dragforce Schiller_Naumann fluid_viscosity 0.0002 fluid_density 1000 region water
fix drag all dragforce Schiller_Naumann fluid_viscosity 0.0002 fluid_density 1000 region water MRF_region rotating_region MRF_angular_velocity 1
Description
Note
For a more thorough description of the transient flow features, please consult the enable_one_way_coupling docu page. Using this command is now the preferred way to perform flow field imports in Aspherix.
Add a drag force for each atom in the group, which reads:
Fd = 0.5*fluid_density*Urel^2*Cd*A*
where A is the particle’s cross-sectional area, Urel is the relative velocity of particle and fluid. fluid_density is the fluid density. If const_Cd is used, then the value of Cd is specified by the user. In case Schiller_Naumann is used, then Cd reads
Cd = max(0.44, 24/Re*(1.+0.15*Re^0.687)
Re = U*2*r/fluid_viscosity
Re is the Reynolds Number, and keyword fluid_viscosity is the kinematic viscosity of the fluid. R is the particle radius. The fluid velocity is read from file (see below), and is interpolated to the particle position.
The mandatory region keyword has to be used. The atom must be in the specified geometric region in order to have drag force added to it. The grid itself will always be a block. If the region used is not a block, its bounding box will be used.
The optional attenuate keyword allows scaling of the drag force. The drag is multiplied by this value before the drag force is computed. This setting does only affect this fix.
The binsize keyword must be used to define the size of the structured bins / grid cells that fills the region. In case binsize does not lead to an integer number of bins in x/y/z direction, the x/y/z binsizes will be rounded up so to achieve this. binsize will also be automatically adjusted in case it would lead to a too fine mesh. If the total number of cells exceeds 8e6, the fix would halt with an error.
With the optional keyword file_coords, you can have the code write the coordinates of each bin / grid cell to a file. An example for a grid just containing 4 cells is shown below:
x y z
-0.500000 -0.500000 0.500000
-0.500000 0.500000 0.500000
0.500000 -0.500000 0.500000
0.500000 0.500000 0.500000
The mandatory keyword file is used to specify the location of the file containing the field values for the flow field data. It contains of a header line and data lines. The first 3 columns must contain any coordinate inside the bin / grid cell for which the field value should be set, followed by data for the field U_fluid. The header line starts with “x y z”, followed by the name of each field and the length (1 for scalar, 3 for vector).
An example for the file format required for file is shown here:
x y z U_x U_y U_z
-0.500000 -0.500000 0.500000 5. 0. 0.
-0.500000 0.500000 0.500000 5. 0. 0.
0.500000 -0.500000 0.500000 0. 0. 0.
0.500000 0.500000 0.500000 0. 0. 0.
An example for the file format required for file_rho is shown here:
x y z rho_fluid
-0.500000 -0.500000 0.500000 1000.
-0.500000 0.500000 0.500000 1000.
0.500000 -0.500000 0.500000 1000.
0.500000 0.500000 0.500000 1000.
Warning
The value for each bin / grid cell has to be set, and none of the cells must be assigned a value twice (by two lines in the file).
With the optional keyword interpolate the parsing of the file can be switched to a more forgiving approach. In case of enabled interpolation the file is loaded, where the average value of all contained points of the bin is assigned to the bin. For undefined bins the corresponding value is calculated by averaging over already defined neighbours.
To ease the setting up of the field values for each bin, you can use the following procedure: file_coords also works out for the case where no file is specified. Aspherix® will fail with an error, but it will write the coordinate file as specified via file_coords. So you can use file_coords to generate the list of required values for any bin, then copy the file, fill the values and use it as input for file
In case both a MRF_region and MRF_angular_velocity are specified the Multiple Reference Frame (MRF) feature is enabled. This feature allows you to specify a rotating reference frame inside your otherwise static fluid field. The particles in a MRF region are mapped to a rotating coordinate system and the particle drag is computed correctly for the rotating fluid velocity field in this region. An example for such a region would be a spinning fan.
The MRF_region keyword is used to specify the name of a region that must be of either style cone or cylinder. The rotation axis and center of rotation is derived from this region. Note, it is not allowed that this region varies in size and that ‘side out’ is used. The MRF_angular_velocity keyword specifies the angular velocity of the rotating region and is taken with respect to the axis of the region and the right-hand-rule.
Restart, fix_modify, output, run start/stop
No information about this fix is written to binary restart files. No fix_modify option applies to this fix. This fix computes no output, which can be accessed by various output commands. No parameter of this fix can be used with the start/stop keywords of the run command.
Restrictions
none
Default
fluid_density = 0, fluid_viscosity = 0, regular_mesh = yes, interpolate = no, interpolateRun = yes, attenuate = 1.