VirtualFluids 0.2.0
Parallel CFD LBM Solver
Loading...
Searching...
No Matches
Calculation.h
Go to the documentation of this file.
1//=======================================================================================
2// ____ ____ __ ______ __________ __ __ __ __
3// \ \ | | | | | _ \ |___ ___| | | | | / \ | |
4// \ \ | | | | | |_) | | | | | | | / \ | |
5// \ \ | | | | | _ / | | | | | | / /\ \ | |
6// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____
7// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______|
8// \ \ | | ________________________________________________________________
9// \ \ | | | ______________________________________________________________|
10// \ \| | | | __ __ __ __ ______ _______
11// \ | | |_____ | | | | | | | | | _ \ / _____)
12// \ | | _____| | | | | | | | | | | \ \ \_______
13// \ | | | | |_____ | \_/ | | | | |_/ / _____ |
14// \ _____| |__| |________| \_______/ |__| |______/ (_______/
15//
16// This file is part of VirtualFluids. VirtualFluids is free software: you can
17// redistribute it and/or modify it under the terms of the GNU General Public
18// License as published by the Free Software Foundation, either version 3 of
19// the License, or (at your option) any later version.
20//
21// VirtualFluids is distributed in the hope that it will be useful, but WITHOUT
22// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
23// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24// for more details.
25//
26// SPDX-License-Identifier: GPL-3.0-or-later
27// SPDX-FileCopyrightText: Copyright © VirtualFluids Project contributors, see AUTHORS.md in root folder
28//
33//=======================================================================================
34#ifndef CALCULATION_H
35#define CALCULATION_H
36
38//porous media
39#define GEO_PM_0 5
40#define GEO_PM_1 6
41#define GEO_PM_2 7
43#define GEO_SOLID 15
44#define GEO_VOID 16
45#define GEO_FLUID 19
47
48#include <basics/DataTypes.h>
49#include <lbm/constants/D3Q27.h>
50
51#include <string>
52#include <vector>
53
54namespace vf::gpu {
55
71
72//Interface Cells
73// example of old names (pre 2023) ICellCFC: interpolation from Coarse (C) to Fine (F), indices of the Coarse cells (C)
80
82
85{
89};
90
92
94{
95 real* f[vf::lbm::dir::NUMBER_Of_DIRECTIONS] = { nullptr };
96 constexpr Distributions27() = default;
97};
98
100
101
103{
104 real* q[vf::lbm::dir::NUMBER_Of_DIRECTIONS];
105};
106
107//Q for second order BCs
110{
111 int* k;
112 int* kN;
113 real* q27[vf::lbm::dir::NUMBER_Of_DIRECTIONS];
116 real *Vx, *Vy, *Vz;
119};
120
122{
123 int* k;
124 int* kN;
125 real* q27[vf::lbm::dir::NUMBER_Of_DIRECTIONS];
128 size_t direction;
129};
130
132{
133 int* k;
134 int* kN;
135 real* q27[vf::lbm::dir::NUMBER_Of_DIRECTIONS];
138 size_t direction;
139};
140
157
159{
161 real* q27[vf::lbm::dir::NUMBER_Of_DIRECTIONS];
163};
164
166{
168 real* q27[vf::lbm::dir::NUMBER_Of_DIRECTIONS];
170 real *vx, *vy, *vz;
172};
173
175{
178 real* q27[vf::lbm::dir::NUMBER_Of_DIRECTIONS];
179 real *vx, *vy, *vz;
181};
182
191
192// Settings for wall model used in StressBC
206
207// Struct for surface layer wall model
220
221
223{
224 std::string name;
226 std::vector<real> Vx;
227 std::vector<real> Vy;
228 std::vector<real> Vz;
229 std::vector<real> Rho;
230};
231
232
234{
235 real* populations[vf::lbm::dir::NUMBER_Of_DIRECTIONS];
236 real* populationsAD[vf::lbm::dir::NUMBER_Of_DIRECTIONS];
237 size_t memsizeFs;
247};
248
249}
250
251#endif
252
std::shared_ptr< T > SPtr
float real
Definition DataTypes.h:42
unsigned int uint
Definition DataTypes.h:47
constexpr std::initializer_list< CollisionTemplate > bulk_CollisionTemplate
Definition Calculation.h:70
constexpr std::initializer_list< CollisionTemplate > all_CollisionTemplate
Definition Calculation.h:69
CollisionTemplate
An enumeration for selecting a template of the collision kernel (CumulantK17)
Definition Calculation.h:57
real * q27[vf::lbm::dir::NUMBER_Of_DIRECTIONS]
real * q27[vf::lbm::dir::NUMBER_Of_DIRECTIONS]
real * q27[vf::lbm::dir::NUMBER_Of_DIRECTIONS]
real * q27[vf::lbm::dir::NUMBER_Of_DIRECTIONS]
real * f[vf::lbm::dir::NUMBER_Of_DIRECTIONS]
Definition Calculation.h:95
constexpr Distributions27()=default
stores location of neighboring cell (necessary for refinement into the wall)
Definition Calculation.h:85
uint * coarseCellIndices
Definition Calculation.h:77
uint * fineCellIndices
Definition Calculation.h:76
std::vector< real > Vx
std::vector< real > Rho
std::vector< real > Vy
std::vector< real > Vz
ProcessNeighbor27(uint numberOfNodes, uint rankNeighbor)
real * populations[vf::lbm::dir::NUMBER_Of_DIRECTIONS]
real * populationsAD[vf::lbm::dir::NUMBER_Of_DIRECTIONS]
real * q27[vf::lbm::dir::NUMBER_Of_DIRECTIONS]
real * q27[vf::lbm::dir::NUMBER_Of_DIRECTIONS]
real * q27[vf::lbm::dir::NUMBER_Of_DIRECTIONS]
real * q27[vf::lbm::dir::NUMBER_Of_DIRECTIONS]
real * q[vf::lbm::dir::NUMBER_Of_DIRECTIONS]
TemperatureWallModelParameters temperatureParameters