Skip to content

Commit 6366861

Browse files
authored
Merge pull request #92 from nnrustamo/refactor_bcs
Refactor bcs
2 parents 4d9b756 + 3d42179 commit 6366861

20 files changed

+186
-430
lines changed
Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
1-
# LBMFixedFirstOrderBC9Q
1+
# LBMFixedFirstOrderBC
22

3-
!syntax description /TensorComputes/Solve/LBMFixedFirstOrderBC9Q
3+
!syntax description /TensorComputes/Solve/LBMFixedFirstOrderBC
44

5-
LBMFixedFirstOrderBC implements Zou\-He velocity boundary conditions at the inlet and outlet for D2Q9, D3Q19 and D3Q27 stencils. The choice of stencil should be indicated in the name of the compute object such as LBMFixedFirstOrderBC9Q for D2Q9.
5+
LBMFixedFirstOrderBC implements Zou\-He velocity boundary conditions at the inlet and outlet for D2Q9, D3Q19 and D3Q27 stencils.
66

77
## Overview
88

99
Enforces first\-order accurate macroscopic velocity at selected domain faces via Zou\-He formulas.
10-
Choose faces with [!param](/TensorComputes/Solve/LBMFixedFirstOrderBC9Q/boundary) and provide
10+
Choose faces with [!param](/TensorComputes/Solve/LBMFixedFirstOrderBC/boundary) and provide
1111
macroscopic fields as required by the implementation.
1212

1313
## Example Input File Syntax
1414

1515
!listing test/tests/lbm/vertical_velocity_bcs.i block=TensorComputes/Boundary/top
1616
!listing test/tests/lbm/vertical_velocity_bcs.i block=TensorComputes/Boundary/bottom
1717

18-
!syntax parameters /TensorComputes/Solve/LBMFixedFirstOrderBC9Q
19-
20-
!syntax inputs /TensorComputes/Solve/LBMFixedFirstOrderBC9Q
21-
22-
!syntax children /TensorComputes/Solve/LBMFixedFirstOrderBC9Q
18+
!syntax parameters /TensorComputes/Solve/LBMFixedFirstOrderBC
Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
1-
# LBMFixedZerothOrderBC9Q
1+
# LBMFixedZerothOrderBC
22

3-
!syntax description /TensorComputes/Solve/LBMFixedZerothOrderBC9Q
3+
!syntax description /TensorComputes/Solve/LBMFixedZerothOrderBC
44

5-
LBMFixedZerothOrderBC implements Zou-He pressure boundary conditions at the inlet and outlet for D2Q9, D3Q19 and D3Q27 stencils. The choice of stencil should be indicated in the name of the compute object such as LBMFixedZerothOrderBC9Q for D2Q9.
5+
LBMFixedZerothOrderBC implements Zou-He pressure boundary conditions at the inlet and outlet for D2Q9, D3Q19 and D3Q27 stencils.
66

77
## Overview
88

9-
LBMFixedZerothOrderBC implements Zou\-He pressure boundary conditions at the inlet and outlet for D2Q9, D3Q19 and D3Q27 stencils. The choice of stencil should be indicated in the name of the compute object such as LBMFixedZerothOrderBC9Q for D2Q9.
10-
Choose faces with [!param](/TensorComputes/Solve/LBMFixedZerothOrderBC9Q/boundary) and provide macroscopic fields as
9+
Enforces first\-order accurate macroscopic pressure at selected domain faces via Zou\-He formulas.
10+
Choose faces with [!param](/TensorComputes/Solve/LBMFixedZerothOrderBC/boundary) and provide macroscopic fields as
1111
required by the implementation.
1212

1313
## Example Input File Syntax
1414

1515
!listing test/tests/lbm/vertical_density_bcs.i block=TensorComputes/Boundary/top
1616
!listing test/tests/lbm/vertical_density_bcs.i block=TensorComputes/Boundary/bottom
1717

18-
!syntax parameters /TensorComputes/Solve/LBMFixedZerothOrderBC9Q
19-
20-
!syntax inputs /TensorComputes/Solve/LBMFixedZerothOrderBC9Q
21-
22-
!syntax children /TensorComputes/Solve/LBMFixedZerothOrderBC9Q
18+
!syntax parameters /TensorComputes/Solve/LBMFixedZerothOrderBC

examples/lbm/Formula1-aerodynamics/f1.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
[]
145145

146146
[left]
147-
type = LBMFixedFirstOrderBC27Q
147+
type = LBMFixedFirstOrderBC
148148
buffer=f
149149
f=f
150150
value=0.01

examples/lbm/Karman-vortex/cylinder.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
boundary = wall
129129
[]
130130
[left]
131-
type = LBMFixedFirstOrderBC9Q
131+
type = LBMFixedFirstOrderBC
132132
buffer=f
133133
f=f
134134
value='Ux'

examples/lbm/Pebbles/pebbles.i

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@
245245
[Boundary]
246246
##### for fluid
247247
[inlet]
248-
type = LBMFixedFirstOrderBC19Q
248+
type = LBMFixedFirstOrderBC
249249
buffer = f
250250
f = f
251251
value = u0
@@ -293,7 +293,7 @@
293293

294294
##### for temperature
295295
[t_inlet]
296-
type = LBMFixedZerothOrderBC19Q
296+
type = LBMFixedZerothOrderBC
297297
buffer = g
298298
f = g
299299
value = T_C

examples/lbm/Rayleigh-Benard/boundary.i

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717

1818
##### for temperature
1919
[temperature_g_top]
20-
type = LBMFixedZerothOrderBC9Q
20+
type = LBMFixedZerothOrderBC
2121
buffer = g
2222
f = g
2323
value = T_C
2424
boundary = top
2525
[]
2626

2727
[temperature_g_bottom]
28-
type = LBMFixedZerothOrderBC9Q
28+
type = LBMFixedZerothOrderBC
2929
buffer = g
3030
f = g
3131
value = T_H

include/tensor_computes/LBMFixedFirstOrderBC.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,23 @@
1313
/**
1414
* LBMFixedFirstOrderBC object
1515
*/
16-
template <int dimension>
17-
class LBMFixedFirstOrderBCTempl : public LBMBoundaryCondition
16+
class LBMFixedFirstOrderBC : public LBMBoundaryCondition
1817
{
1918
public:
2019
static InputParameters validParams();
2120

22-
LBMFixedFirstOrderBCTempl(const InputParameters & parameters);
21+
LBMFixedFirstOrderBC(const InputParameters & parameters);
2322

2423
void init() override {};
2524

2625
void topBoundary() override;
26+
void topBoundaryD2Q9();
2727
void bottomBoundary() override;
28+
void bottomBoundaryD2Q9();
2829
void leftBoundary() override;
30+
void leftBoundaryD2Q9();
2931
void rightBoundary() override;
32+
void rightBoundaryD2Q9();
3033
void frontBoundary() override;
3134
void backBoundary() override;
3235
void computeBuffer() override;
@@ -37,7 +40,3 @@ class LBMFixedFirstOrderBCTempl : public LBMBoundaryCondition
3740
const Real & _value;
3841
const bool _perturb;
3942
};
40-
41-
typedef LBMFixedFirstOrderBCTempl<9> LBMFixedFirstOrderBC9Q;
42-
typedef LBMFixedFirstOrderBCTempl<19> LBMFixedFirstOrderBC19Q;
43-
typedef LBMFixedFirstOrderBCTempl<27> LBMFixedFirstOrderBC27Q;

include/tensor_computes/LBMFixedZerothOrderBC.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,21 @@
1313
/**
1414
* LBMFixedZerothOrderBC object
1515
*/
16-
template <int dimension>
17-
class LBMFixedZerothOrderBCTempl : public LBMBoundaryCondition
16+
class LBMFixedZerothOrderBC : public LBMBoundaryCondition
1817
{
1918
public:
2019
static InputParameters validParams();
2120

22-
LBMFixedZerothOrderBCTempl(const InputParameters & parameters);
21+
LBMFixedZerothOrderBC(const InputParameters & parameters);
2322

2423
void topBoundary() override;
24+
void topBoundaryD2Q9();
2525
void bottomBoundary() override;
26+
void bottomBoundaryD2Q9();
2627
void leftBoundary() override;
28+
void leftBoundaryD2Q9();
2729
void rightBoundary() override;
30+
void rightBoundaryD2Q9();
2831
void frontBoundary() override;
2932
void backBoundary() override;
3033
void computeBuffer() override;
@@ -34,7 +37,3 @@ class LBMFixedZerothOrderBCTempl : public LBMBoundaryCondition
3437
const std::array<int64_t, 3> _grid_size;
3538
const Real _value;
3639
};
37-
38-
typedef LBMFixedZerothOrderBCTempl<9> LBMFixedZerothOrderBC9Q;
39-
typedef LBMFixedZerothOrderBCTempl<19> LBMFixedZerothOrderBC19Q;
40-
typedef LBMFixedZerothOrderBCTempl<27> LBMFixedZerothOrderBC27Q;

0 commit comments

Comments
 (0)