LBMD3Q27
LBMD3Q27 Stencil object.
LBMD3Q27 objects creatres D3Q27 stencil. This object holds tensors for directions and weights of streaming, momentum and inverse transformation matrices, diagonal relaxation matrix, and the indices of boundaries required for boundary conditions.
Overview
Constructs a 3-D, 27-velocity LBM stencil (D3Q27) and exposes its discrete velocities, weights, and indexing used by streaming and boundary conditions.
Example Input File Syntax
[Stencil<<<{"href": "../../syntax/Stencil/index.html"}>>>]
[descriptor]
type = LBMD3Q27<<<{"description": "LBMD3Q27 Stencil object.", "href": "LBMD3Q27.html"}>>>
[]
[](examples/lbm/Formula1-aerodynamics/f1.i)Input Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:No
Description:Set the enabled status of the MooseObject.
Input Files
(examples/lbm/Formula1-aerodynamics/f1.i)
[Domain]
dim = 3
nx = 781
ny = 274
nz = 146
xmax = 781
ymax = 274
zmax = 146
device_names='cuda'
floating_precision = 'single'
parallel_mode = REAL_SPACE
periodic_directions = 'X Y Z'
[]
[Stencil]
[descriptor]
type = LBMD3Q27
[]
[]
[TensorBuffers]
[binary_media]
type = LBMTensorBuffer
buffer_type = ms
file = 'binary_media.h5'
is_integer = true
[]
[f]
type = LBMTensorBuffer
buffer_type = df
[]
[feq]
type = LBMTensorBuffer
buffer_type = df
[]
[fpc]
type = LBMTensorBuffer
buffer_type = df
[]
[u]
type = LBMTensorBuffer
buffer_type = mv
[]
[speed]
type=LBMTensorBuffer
buffer_type = ms
[]
[rho]
type = LBMTensorBuffer
buffer_type = ms
[]
[force]
type = LBMTensorBuffer
buffer_type = mv
[]
[]
[TensorComputes]
[Initialize]
[density_initial]
type = LBMConstantTensor
buffer = rho
constants = 1.0
[]
[velocity_initial]
type = LBMConstantTensor
buffer = u
constants = '0 0 0'
[]
[equilibrium_init]
type = LBMEquilibrium
buffer = feq
bulk = rho
velocity = u
[]
[equilibrium_f]
type = LBMEquilibrium
buffer = f
bulk = rho
velocity = u
[]
[equilibrium_pc]
type = LBMEquilibrium
buffer = fpc
bulk = rho
velocity = u
[]
[]
[Solve]
[density]
type = LBMComputeDensity
buffer = rho
f = f
[]
[velocity]
type = LBMComputeVelocity
buffer = u
f = f
rho = rho
[]
[equilibrium]
type = LBMEquilibrium
buffer = feq
bulk = rho
velocity = u
[]
[collision]
type = LBMSmagorinskyCollision
buffer = fpc
f = f
feq = feq
tau0 = 0.5001
Cs = 0.15
projection=true
[]
[speed]
type=LBMComputeVelocityMagnitude
buffer=speed
velocity=u
[]
[residual]
type = LBMComputeResidual
buffer = speed
speed = speed
[]
[]
[Boundary]
[wall]
type = LBMBounceBack
buffer = f
f_old = fpc
boundary = wall
[]
[left]
type = LBMFixedFirstOrderBC
buffer=f
f=f
value=0.01
boundary=left
# perturb=true
[]
[right]
type = LBMMicroscopicZeroGradientBC
buffer=f
boundary = right
[]
[]
[]
[TensorSolver]
type = LBMStream
root_compute = residual
buffer = f
f_old = fpc
[]
[Postprocessors]
[reynolds]
type = ComputeReynoldsNumber
buffer = speed
tau = 0.5001
diameter = 781
[]
[]
[Problem]
type = LatticeBoltzmannProblem
substeps = 100
print_debug_output = true
binary_media = binary_media
[]
[Executioner]
type = Transient
num_steps = 2000
[]
[TensorOutputs]
[xdmf2]
type = XDMFTensorOutput
buffer = 'rho u'
output_mode = 'Cell Cell'
enable_hdf5 = true
[]
[]
(examples/lbm/Phase-field/static_bubble_3d.i)
#
# 3D Static bubble test case
# Based on the 2D static bubble (PHYSICAL REVIEW E 97, 033309 - Section III.A)
# Small domain to verify 3D gradient/laplacian correctness
#
# Domain (small for quick testing)
Nx = 40
Ny = 40
Nz = 40
# Bubble parameters
Cx = '${Nx}/2.0'
Cy = '${Ny}/2.0'
Cz = '${Nz}/2.0'
R = 12
# Fluid properties
rho_l = 1000.0
rho_g = 1.0
nu_l = 0.1
nu_g = 0.1
sigma = 0.001
# Phase field parameters
tau_h = 0.7
D = 4
[Domain]
dim = 3
nx = '${Nx}'
ny = '${Ny}'
nz = '${Nz}'
xmax = '${Nx}'
ymax = '${Ny}'
zmax = '${Nz}'
device_names = 'cpu'
parallel_mode = REAL_SPACE
periodic_directions = 'X Y Z'
[]
[Stencil]
[d3q27]
type = LBMD3Q27
[]
[]
[TensorBuffers]
# Macroscopic phase field variables
[phi]
type = LBMTensorBuffer
buffer_type = ms
[]
[grad_phi]
type = LBMTensorBuffer
buffer_type = mv
[]
[laplacian_phi]
type = LBMTensorBuffer
buffer_type = ms
[]
[mu]
type = LBMTensorBuffer
buffer_type = ms
[]
[forces]
type = LBMTensorBuffer
buffer_type = mv
[]
# Macroscopic hydrodynamic variables
[velocity]
type = LBMTensorBuffer
buffer_type = mv
[]
[pressure]
type = LBMTensorBuffer
buffer_type = ms
[]
[rho]
type = LBMTensorBuffer
buffer_type = ms
[]
# LBM phase field variables
[h]
type = LBMTensorBuffer
buffer_type = df
[]
[h_post_collision]
type = LBMTensorBuffer
buffer_type = df
[]
[h_eq]
type = LBMTensorBuffer
buffer_type = df
[]
[relaxation_tensor]
type = LBMTensorBuffer
buffer_type = ms
[]
# LBM hydrodynamic variables
[f]
type = LBMTensorBuffer
buffer_type = df
[]
[f_post_collision]
type = LBMTensorBuffer
buffer_type = df
[]
[f_eq]
type = LBMTensorBuffer
buffer_type = df
[]
[]
[TensorComputes/Initialize]
[phi_init]
type = ParsedCompute
buffer = phi
expression = '0.5 + 0.5 * tanh(2*(R - sqrt((x - Cx)^2 + (y - Cy)^2 + (z - Cz)^2)) / D)'
constant_names = 'Cx Cy Cz R D'
constant_expressions = '${Cx} ${Cy} ${Cz} ${R} ${D}'
extra_symbols = true
[]
[grad_phi_init]
type = LBMIsotropicGradient
buffer = grad_phi
scalar_field = phi
[]
[rho_init]
type = ParsedCompute
buffer = rho
extra_symbols = true
expression = 'phi*(rho_l - rho_g) + rho_g'
constant_names = 'rho_l rho_g'
constant_expressions = '${rho_l} ${rho_g}'
inputs = phi
[]
[pressure_init]
type = LBMConstantTensor
buffer = pressure
constants = 0.3
[]
[h_eq_init]
type = LBMPhaseEquilibrium
buffer = h_eq
phi = phi
velocity = velocity
[]
[h_post_collision_init]
type = LBMPhaseEquilibrium
buffer = h_post_collision
phi = phi
velocity = velocity
[]
[h_init]
type = LBMPhaseEquilibrium
buffer = h
phi = phi
velocity = velocity
[]
[f_eq_init]
type = LBMPressureCorrectedEquilibrium
buffer = f_eq
rho = rho
velocity = velocity
pressure = pressure
[]
[f_post_collision_init]
type = ParsedCompute
buffer = f_post_collision
expression = 'f_eq'
inputs = f_eq
[]
[f_init]
type = ParsedCompute
buffer = f
expression = 'f_eq'
inputs = f_eq
[]
[]
[TensorComputes/Solve]
# Phase Field
[compute_phi]
type = LBMComputeDensity
buffer = phi
f = h
[]
[grad_phi]
type = LBMIsotropicGradient
buffer = grad_phi
scalar_field = phi
[]
[laplacian_phi]
type = LBMIsotropicLaplacian
buffer = laplacian_phi
scalar_field = phi
[]
[potential]
type = LBMComputeChemicalPotential
buffer = mu
phi = phi
laplacian_phi = laplacian_phi
thickness = D
sigma = sigma
[]
[forces]
type = LBMComputeSurfaceForces
buffer = forces
chemical_potential = mu
grad_phi = grad_phi
[]
# Hydrodynamics
[density]
type = ParsedCompute
buffer = rho
extra_symbols = true
expression = 'phi*(rho_l - rho_g) + rho_g'
constant_names = 'rho_l rho_g'
constant_expressions = '${rho_l} ${rho_g}'
inputs = phi
[]
[velocity]
type = LBMComputeVelocity
buffer = velocity
f = f
rho = rho
enable_forces = true
forces = forces
[]
[h_eq]
type = LBMPhaseEquilibrium
buffer = h_eq
phi = phi
velocity = velocity
[]
[phase_collision]
type = LBMBGKCollision
buffer = h_post_collision
f = h
feq = h_eq
tau0 = tau_h
[]
[apply_forces_phase]
type = LBMAllenCahnSource
buffer = h_post_collision
phi = phi
velocity = velocity
grad_phi = grad_phi
tau = tau_h
thickness = D
[]
[relaxation_tensor]
type = ParsedCompute
buffer = relaxation_tensor
extra_symbols = true
expression = '(phi*(nu_l - nu_g) + nu_g)/cs2+0.5'
constant_names = 'nu_l nu_g cs2'
constant_expressions = '${nu_l} ${nu_g} 0.3333'
inputs = phi
[]
[pressure]
type = LBMPhaseFieldPressure
buffer = pressure
f = f
velocity = velocity
grad_phi = grad_phi
rho = rho
rho_l = '${rho_l}'
rho_g = '${rho_g}'
[]
[f_eq]
type = LBMPressureCorrectedEquilibrium
buffer = f_eq
rho = rho
velocity = velocity
pressure = pressure
[]
[collision]
type = LBMBGKCollision
buffer = f_post_collision
f = f
feq = f_eq
tau0 = 1.0
is_dynamic_relaxation = true
tau_tensor = relaxation_tensor
[]
[apply_forces_hydro]
type = LBMForceDistribution
buffer = f_post_collision
grad_phi = grad_phi
velocity = velocity
forces = forces
tau_tensor = relaxation_tensor
tau = 1.0
rho_l = '${rho_l}'
rho_g = '${rho_g}'
is_dynamic_relaxation = true
[]
[residual]
type = LBMComputeResidual
buffer = phi
speed = phi
[]
[]
[TensorSolver]
type = LBMStream
buffer = 'h f'
f_old = 'h_post_collision f_post_collision'
root_compute = residual
[]
[Postprocessors]
[velocity_min]
type = TensorExtremeValuePostprocessor
buffer = velocity
value_type = MIN
[]
[velocity_max]
type = TensorExtremeValuePostprocessor
buffer = velocity
value_type = MAX
[]
[density_min]
type = TensorExtremeValuePostprocessor
buffer = rho
value_type = MIN
[]
[density_max]
type = TensorExtremeValuePostprocessor
buffer = rho
value_type = MAX
[]
[]
[Problem]
type = LatticeBoltzmannProblem
substeps = 10
print_debug_output = true
scalar_constant_names = 'tau_h D sigma'
scalar_constant_values = '${tau_h} ${D} ${sigma}'
[]
[Executioner]
type = Transient
num_steps = 50
[]
[TensorOutputs]
[xdmf]
type = XDMFTensorOutput
buffer = 'phi rho velocity forces'
output_mode = 'Cell Cell Cell Cell'
enable_hdf5 = true
# transpose = false
[]
[]
(examples/lbm/Formula1-aerodynamics/f1.i)
[Domain]
dim = 3
nx = 781
ny = 274
nz = 146
xmax = 781
ymax = 274
zmax = 146
device_names='cuda'
floating_precision = 'single'
parallel_mode = REAL_SPACE
periodic_directions = 'X Y Z'
[]
[Stencil]
[descriptor]
type = LBMD3Q27
[]
[]
[TensorBuffers]
[binary_media]
type = LBMTensorBuffer
buffer_type = ms
file = 'binary_media.h5'
is_integer = true
[]
[f]
type = LBMTensorBuffer
buffer_type = df
[]
[feq]
type = LBMTensorBuffer
buffer_type = df
[]
[fpc]
type = LBMTensorBuffer
buffer_type = df
[]
[u]
type = LBMTensorBuffer
buffer_type = mv
[]
[speed]
type=LBMTensorBuffer
buffer_type = ms
[]
[rho]
type = LBMTensorBuffer
buffer_type = ms
[]
[force]
type = LBMTensorBuffer
buffer_type = mv
[]
[]
[TensorComputes]
[Initialize]
[density_initial]
type = LBMConstantTensor
buffer = rho
constants = 1.0
[]
[velocity_initial]
type = LBMConstantTensor
buffer = u
constants = '0 0 0'
[]
[equilibrium_init]
type = LBMEquilibrium
buffer = feq
bulk = rho
velocity = u
[]
[equilibrium_f]
type = LBMEquilibrium
buffer = f
bulk = rho
velocity = u
[]
[equilibrium_pc]
type = LBMEquilibrium
buffer = fpc
bulk = rho
velocity = u
[]
[]
[Solve]
[density]
type = LBMComputeDensity
buffer = rho
f = f
[]
[velocity]
type = LBMComputeVelocity
buffer = u
f = f
rho = rho
[]
[equilibrium]
type = LBMEquilibrium
buffer = feq
bulk = rho
velocity = u
[]
[collision]
type = LBMSmagorinskyCollision
buffer = fpc
f = f
feq = feq
tau0 = 0.5001
Cs = 0.15
projection=true
[]
[speed]
type=LBMComputeVelocityMagnitude
buffer=speed
velocity=u
[]
[residual]
type = LBMComputeResidual
buffer = speed
speed = speed
[]
[]
[Boundary]
[wall]
type = LBMBounceBack
buffer = f
f_old = fpc
boundary = wall
[]
[left]
type = LBMFixedFirstOrderBC
buffer=f
f=f
value=0.01
boundary=left
# perturb=true
[]
[right]
type = LBMMicroscopicZeroGradientBC
buffer=f
boundary = right
[]
[]
[]
[TensorSolver]
type = LBMStream
root_compute = residual
buffer = f
f_old = fpc
[]
[Postprocessors]
[reynolds]
type = ComputeReynoldsNumber
buffer = speed
tau = 0.5001
diameter = 781
[]
[]
[Problem]
type = LatticeBoltzmannProblem
substeps = 100
print_debug_output = true
binary_media = binary_media
[]
[Executioner]
type = Transient
num_steps = 2000
[]
[TensorOutputs]
[xdmf2]
type = XDMFTensorOutput
buffer = 'rho u'
output_mode = 'Cell Cell'
enable_hdf5 = true
[]
[]
(test/tests/lbm/mixed_bcs_d3q27_reverse.i)
[Domain]
dim = 3
nx = 10
ny = 10
nz = 10
mesh_mode = DUMMY
parallel_mode = REAL_SPACE
periodic_directions = 'X Y Z'
[]
[Stencil]
[d3q27]
type = LBMD3Q27
[]
[]
[TensorBuffers]
[f]
type = LBMTensorBuffer
buffer_type = df
[]
[f_bounce_back]
type = LBMTensorBuffer
buffer_type = df
[]
[velocity]
type=LBMTensorBuffer
buffer_type = mv
[]
[density]
type=LBMTensorBuffer
buffer_type = ms
[]
[]
[TensorComputes]
[Initialize]
[initial_density]
type = LBMConstantTensor
buffer = density
constants = 1.0
[]
[initial_velocity]
type = LBMConstantTensor
buffer = velocity
constants = '0.0001 0.0005 0.0'
[]
[initial_f]
type = LBMEquilibrium
buffer = f
bulk = density
velocity = velocity
[]
[initial_f_bb]
type = LBMEquilibrium
buffer = f_bounce_back
bulk = density
velocity = velocity
[]
[]
[Solve]
[density]
type = LBMComputeDensity
buffer = density
f = f
[]
[velocity]
type = LBMComputeVelocity
buffer = velocity
f = f
rho = density
add_body_force = true
body_force_x = 0.0001
[]
[]
[Boundary]
[right]
type = LBMFixedZerothOrderBC
buffer = f
f = f
value = 1.1
boundary = right
[]
[left]
type = LBMFixedFirstOrderBC
buffer = f
f = f
value = 0.0001
boundary = left
[]
[]
[]
[TensorSolver]
type = LBMStream
buffer = f
f_old = f_bounce_back
[]
[Problem]
type = LatticeBoltzmannProblem
substeps = 1
[]
[Postprocessors]
[velocity_min]
type = TensorExtremeValuePostprocessor
buffer = velocity
value_type = MIN
[]
[velocity_max]
type = TensorExtremeValuePostprocessor
buffer = velocity
value_type = MAX
[]
[density_min]
type = TensorExtremeValuePostprocessor
buffer = density
value_type = MIN
[]
[densty_max]
type = TensorExtremeValuePostprocessor
buffer = density
value_type = MAX
[]
[]
[Executioner]
type = Transient
num_steps = 5
[]
[Outputs]
file_base = mixed_bcs_d3q27_reverse
csv = true
[]
(test/tests/lbm/phase_3D.i)
# Domain
Nx = 20
Ny = 20
Nz = 20
# Fluid properties
rho_l = 5.0
rho_g = 1.0
nu_l = 0.1
nu_g = 1.0
sigma = 0.2
# Phase field parameters
tau_h = 1.0
D = 4
[Domain]
dim = 3
nx = '${Nx}'
ny = '${Ny}'
nz = '${Nz}'
xmax = '${Nx}'
ymax = '${Ny}'
zmax = '${Nz}'
device_names='cpu'
parallel_mode = REAL_SPACE
periodic_directions = 'X Y Z'
[]
[Stencil]
[d3q27]
type = LBMD3Q27
[]
[]
[TensorBuffers]
# Macroscopic phase field variables
[phi]
type = LBMTensorBuffer
buffer_type = ms
[]
[grad_phi]
type = LBMTensorBuffer
buffer_type = mv
[]
[laplacian_phi]
type = LBMTensorBuffer
buffer_type = ms
[]
[mu]
type = LBMTensorBuffer
buffer_type = ms
[]
[forces]
type = LBMTensorBuffer
buffer_type = mv
[]
# Macroscopic hydrodynamic variables
[velocity]
type = LBMTensorBuffer
buffer_type = mv
[]
[pressure]
type = LBMTensorBuffer
buffer_type = ms
[]
[rho]
type = LBMTensorBuffer
buffer_type = ms
[]
# LBM phase field variabels
[h]
type = LBMTensorBuffer
buffer_type = df
[]
[h_post_collision]
type = LBMTensorBuffer
buffer_type = df
[]
[h_eq]
type = LBMTensorBuffer
buffer_type = df
[]
[relaxation_tensor]
type = LBMTensorBuffer
buffer_type = ms
[]
# LBM hydrodynamic variables
[fdummy]
type = LBMTensorBuffer
buffer_type = df
[]
[f]
type = LBMTensorBuffer
buffer_type = df
[]
[f_post_collision]
type = LBMTensorBuffer
buffer_type = df
[]
[f_eq]
type = LBMTensorBuffer
buffer_type = df
[]
[]
[TensorComputes/Initialize]
[phi_init]
type = ParsedCompute
buffer = phi
extra_symbols = true
expression = '0.3333 + 0.01*sin((12.9898*x + 78.233*y + 43.12*z)*2*pi)'
[]
[grad_phi_init]
type = LBMIsotropicGradient
buffer = grad_phi
scalar_field = phi
[]
[rho_init]
type = ParsedCompute
buffer = rho
extra_symbols = true
expression = 'phi*(rho_l - rho_g) + rho_g'
constant_names = 'rho_l rho_g'
constant_expressions = '${rho_l} ${rho_g}'
inputs = phi
[]
[pressure_init]
type = LBMConstantTensor
buffer = pressure
constants = 0.3
[]
# Phase field equilibrium distribution initialization
[h_eq_init]
type = LBMPhaseEquilibrium
buffer = h_eq
phi = phi
velocity = velocity
[]
[h_post_collision_init]
type = LBMPhaseEquilibrium
buffer = h_post_collision
phi = phi
velocity = velocity
[]
[h_init]
type = LBMPhaseEquilibrium
buffer = h
phi = phi
velocity = velocity
[]
# Hydrodynamic equilibrium distribution initialization
[f_eq_init]
type = LBMPressureCorrectedEquilibrium
buffer = f_eq
rho = rho
velocity = velocity
pressure = pressure
[]
[f_post_collision_init]
type = ParsedCompute
buffer = f_post_collision
expression = 'f_eq'
inputs = f_eq
[]
[f_init]
type = ParsedCompute
buffer = f
expression = 'f_eq'
inputs = f_eq
[]
[]
[TensorComputes/Solve]
# Phase Field
[compute_phi]
type = LBMComputeDensity
buffer = phi
f = h
[]
[grad_phi]
type = LBMIsotropicGradient
buffer = grad_phi
scalar_field = phi
[]
[laplacian_phi]
type = LBMIsotropicLaplacian
buffer = laplacian_phi
scalar_field = phi
[]
[potential]
type = LBMComputeChemicalPotential
buffer = mu
phi = phi
laplacian_phi = laplacian_phi
thickness = D
sigma = sigma
[]
[forces]
type = LBMComputeSurfaceForces
buffer = forces
chemical_potential = mu
grad_phi = grad_phi
[]
# Hydrodynamics
[density]
type = ParsedCompute
buffer = rho
extra_symbols = true
expression = 'phi*(rho_l - rho_g) + rho_g'
constant_names = 'rho_l rho_g'
constant_expressions = '${rho_l} ${rho_g}'
inputs = phi
[]
[velocity]
type = LBMComputeVelocity
buffer = velocity
f = f
rho = rho
enable_forces = true
forces = forces
[]
# Phase-field
[h_eq]
type = LBMPhaseEquilibrium
buffer = h_eq
phi = phi
velocity = velocity
[]
[phase_collision]
type = LBMBGKCollision
buffer = h_post_collision
f = h
feq = h_eq
tau0 = tau_h
[]
[apply_forces_phase]
type = LBMAllenCahnSource
buffer = h_post_collision
phi = phi
velocity = velocity
grad_phi = grad_phi
tau = tau_h
thickness = D
[]
# Hydrodynamics
[relaxation_tensor]
type = ParsedCompute
buffer = relaxation_tensor
extra_symbols = true
expression = '(phi*(nu_l - nu_g) + nu_g)/cs2+0.5'
constant_names = 'nu_l nu_g cs2'
constant_expressions = '${nu_l} ${nu_g} 0.3333'
inputs = phi
[]
[pressure]
type = LBMPhaseFieldPressure
buffer = pressure
f = f
velocity = velocity
grad_phi = grad_phi
rho = rho
rho_l = '${rho_l}'
rho_g = '${rho_g}'
[]
[f_eq]
type = LBMPressureCorrectedEquilibrium
buffer = f_eq
rho = rho
velocity = velocity
pressure = pressure
[]
[collision]
type = LBMBGKCollision
buffer = f_post_collision
f = f
feq = f_eq
tau0 = 1.0
is_dynamic_relaxation = true
tau_tensor = relaxation_tensor
[]
[apply_forces_hydro]
type = LBMForceDistribution
buffer = f_post_collision
grad_phi = grad_phi
velocity = velocity
forces = forces
tau_tensor = relaxation_tensor
tau = 1.0
rho_l = '${rho_l}'
rho_g = '${rho_g}'
is_dynamic_relaxation = true
[]
[residual]
type = LBMComputeResidual
buffer = phi
speed = phi
[]
[]
[TensorSolver]
type = LBMStream
buffer = 'h f'
f_old = 'h_post_collision f_post_collision'
[]
[Postprocessors]
[phi_min]
type = TensorExtremeValuePostprocessor
buffer = phi
value_type = MIN
[]
[phi_max]
type = TensorExtremeValuePostprocessor
buffer = phi
value_type = MAX
[]
[density_min]
type = TensorExtremeValuePostprocessor
buffer = rho
value_type = MIN
[]
[density_max]
type = TensorExtremeValuePostprocessor
buffer = rho
value_type = MAX
[]
[velocity_min]
type = TensorExtremeValuePostprocessor
buffer = velocity
value_type = MIN
[]
[velocity_max]
type = TensorExtremeValuePostprocessor
buffer = velocity
value_type = MAX
[]
[]
[Problem]
type = LatticeBoltzmannProblem
substeps = 5
print_debug_output = true
scalar_constant_names = 'tau_h D sigma'
scalar_constant_values = '${tau_h} ${D} ${sigma}'
[]
[Executioner]
type = Transient
num_steps = 5
[]
[Outputs]
file_base = phase_3D
csv = true
[]
(test/tests/lbm/mixed_bcs_d3q27.i)
[Domain]
dim = 3
nx = 10
ny = 10
nz = 10
mesh_mode = DUMMY
parallel_mode = REAL_SPACE
periodic_directions = 'X Y Z'
[]
[Stencil]
[d3q27]
type = LBMD3Q27
[]
[]
[TensorBuffers]
[f]
type = LBMTensorBuffer
buffer_type = df
[]
[f_bounce_back]
type = LBMTensorBuffer
buffer_type = df
[]
[velocity]
type=LBMTensorBuffer
buffer_type = mv
[]
[density]
type=LBMTensorBuffer
buffer_type = ms
[]
[]
[TensorComputes]
[Initialize]
[initial_density]
type = LBMConstantTensor
buffer = density
constants = 1.0
[]
[initial_velocity]
type = LBMConstantTensor
buffer = velocity
constants = '0.0001 0.0005 0.0'
[]
[initial_f]
type = LBMEquilibrium
buffer = f
bulk = density
velocity = velocity
[]
[initial_f_bb]
type = LBMEquilibrium
buffer = f_bounce_back
bulk = density
velocity = velocity
[]
[]
[Solve]
[density]
type = LBMComputeDensity
buffer = density
f = f
[]
[velocity]
type = LBMComputeVelocity
buffer = velocity
f = f
rho = density
add_body_force = true
body_force_x = 0.0001
[]
[]
[Boundary]
[left]
type = LBMFixedZerothOrderBC
buffer = f
f = f
value = 1.1
boundary = left
[]
[right]
type = LBMFixedFirstOrderBC
buffer = f
f = f
value = 0.0001
boundary = right
[]
[]
[]
[TensorSolver]
type = LBMStream
buffer = f
f_old = f_bounce_back
[]
[Problem]
type = LatticeBoltzmannProblem
substeps = 1
[]
[Postprocessors]
[velocity_min]
type = TensorExtremeValuePostprocessor
buffer = velocity
value_type = MIN
[]
[velocity_max]
type = TensorExtremeValuePostprocessor
buffer = velocity
value_type = MAX
[]
[density_min]
type = TensorExtremeValuePostprocessor
buffer = density
value_type = MIN
[]
[densty_max]
type = TensorExtremeValuePostprocessor
buffer = density
value_type = MAX
[]
[]
[Executioner]
type = Transient
num_steps = 5
[]
[Outputs]
file_base = mixed_bcs_d3q27
csv = true
[]
(test/tests/lbm/isotropic_stencil_mrt.i)
[Domain]
dim = 3
nx = 10
ny = 10
nz = 10
mesh_mode = DUMMY
parallel_mode = REAL_SPACE
periodic_directions = 'X Y Z'
[]
[Stencil]
[d3q27]
type = LBMD3Q27
[]
[]
[TensorBuffers]
[f]
type = LBMTensorBuffer
buffer_type = df
[]
[feq]
type = LBMTensorBuffer
buffer_type = df
[]
[fpc]
type = LBMTensorBuffer
buffer_type = df
[]
[velocity]
type=LBMTensorBuffer
buffer_type = mv
[]
[density]
type=LBMTensorBuffer
buffer_type = ms
[]
[speed]
type=LBMTensorBuffer
buffer_type = ms
[]
[]
[TensorComputes]
[Initialize]
[initial_density]
type = LBMConstantTensor
buffer = density
constants = 1.0
[]
[initial_velocity]
type = LBMConstantTensor
buffer = velocity
constants = '0.0 0.0 0.0'
[]
[initial_equilibrium]
type = LBMEquilibrium
buffer = feq
bulk = density
velocity = velocity
[]
[initial_distribution]
type = LBMEquilibrium
buffer = f
bulk = density
velocity = velocity
[]
[initial_distribution_pc]
type = LBMEquilibrium
buffer = fpc
bulk = density
velocity = velocity
[]
[]
[Solve]
[equilibrium]
type=LBMEquilibrium
buffer = feq
bulk = density
velocity = velocity
[]
[collision]
type=LBMMRTCollision
buffer = fpc
f = f
feq = feq
tau0 = 1.0
[]
[density]
type = LBMComputeDensity
buffer = density
f = f
[]
[velocity]
type = LBMComputeVelocity
buffer = velocity
f = f
rho = density
add_body_force = true
body_force_x = 0.0001
[]
[speed]
type = LBMComputeVelocityMagnitude
buffer = speed
velocity = velocity
[]
[residual]
type = LBMComputeResidual
buffer = speed
speed = speed
[]
[]
[Boundary]
[top]
type = LBMBounceBack
buffer = f
f_old = fpc
boundary = top
[]
[bottom]
type = LBMBounceBack
buffer = f
f_old = fpc
boundary = bottom
[]
[]
[]
[TensorSolver]
type = LBMStream
buffer = f
f_old = fpc
[]
[Problem]
type = LatticeBoltzmannProblem
substeps = 11
[]
[Postprocessors]
[velocity_min]
type = TensorExtremeValuePostprocessor
buffer = velocity
value_type = MIN
[]
[velocity_max]
type = TensorExtremeValuePostprocessor
buffer = velocity
value_type = MAX
[]
[speed_min]
type = TensorExtremeValuePostprocessor
buffer = speed
value_type = MIN
[]
[speed_max]
type = TensorExtremeValuePostprocessor
buffer = speed
value_type = MAX
[]
[density_min]
type = TensorExtremeValuePostprocessor
buffer = density
value_type = MIN
[]
[densty_max]
type = TensorExtremeValuePostprocessor
buffer = density
value_type = MAX
[]
[]
[Executioner]
type = Transient
num_steps = 5
[]
[Outputs]
file_base = isotropic_stencil_mrt
csv = true
[]