基与OpenFOAM 13,我想单独在collidingParcel中添加一个壁面碰撞模型的话,进入下面的文件中。

1
~/OpenFOAM/abcxxx-13/src/IVT13_src/lagrangian/parcel/parcels/derived/collidingParcel/makeCollidingParcelSubmodels.C

因为每个cloud在使用submodel的时候都需要有一个makeXXXmodels.H。
那么你单独为这个cloud生成一个makeXXXmodels.H 即可。
例如我的情况,我需要单独生成一个考虑rotation的壁面模型。
而momentumparcel中并没有考虑omega,而且我也不想在其中添加omega这个变量。
而在Collidingparcel中,直接就有omega,所以我想在collidingparcel中添加这个模型。
但是如果我修改原本的makeParcelPatchInteractionModels_rotation.H的话,那么所有引用此文件的cloud都有这个模型。但是并不是所有cloud都有omega这个变量。
因此,单独给collidingcloud 添加一个 “makeParcelPatchInteractionModels_rotation.H” 即可。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.

\*---------------------------------------------------------------------------*/

#include "collidingCloud.H"

#include "makeParcelCloudFunctionObjects.H"

// Momentum
#include "makeParcelForces.H"
#include "makeParcelDispersionModels.H"
#include "makeParcelInjectionModels.H"
#include "makeParcelCollisionModels.H"
#include "makeParcelPatchInteractionModels_rotation.H"
#include "makeParcelStochasticCollisionModels.H"
#include "makeParcelSurfaceFilmModels.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

makeParcelCloudFunctionObjects(collidingCloud);

// Momentum sub-models
makeParcelForces(collidingCloud);
makeParcelDispersionModels(collidingCloud);
makeParcelInjectionModels(collidingCloud);
makeParcelCollisionModels(collidingCloud);
makeParcelPatchInteractionModels(collidingCloud);
makeParcelStochasticCollisionModels(collidingCloud);
makeParcelSurfaceFilmModels(collidingCloud);


// ************************************************************************* //
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.

\*---------------------------------------------------------------------------*/

#ifndef makeParcelPatchInteractionModels_H
#define makeParcelPatchInteractionModels_H

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

// #include "LocalInteraction.H"
// #include "NoInteraction.H"
// #include "Rebound.H"
// #include "StandardWallInteraction.H"
#include "IVT13_StandardWallInteraction.H"
#include "IVT13_LocalInteraction.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

#define makeParcelPatchInteractionModels(CloudType) \
\
makePatchInteractionModel(CloudType); \
\
makePatchInteractionModelType(IVT13_StandardWallInteraction, CloudType); \
makePatchInteractionModelType(IVT13_LocalInteraction, CloudType); \
\

// makePatchInteractionModelType(LocalInteraction, CloudType); \
// makePatchInteractionModelType(NoInteraction, CloudType); \
// makePatchInteractionModelType(Rebound, CloudType); \
// makePatchInteractionModelType(StandardWallInteraction, CloudType);


// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

#endif
// ************************************************************************* //