mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -18,7 +18,8 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
|
||||||
-I$(LIB_SRC)/ODE/lnInclude \
|
-I$(LIB_SRC)/ODE/lnInclude \
|
||||||
-I$(LIB_SRC)/surfaceFilmModels/lnInclude
|
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||||
|
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
@ -40,4 +41,5 @@ EXE_LIBS = \
|
|||||||
-lchemistryModel \
|
-lchemistryModel \
|
||||||
-lradiationModels \
|
-lradiationModels \
|
||||||
-lODE \
|
-lODE \
|
||||||
|
-lregionModels \
|
||||||
-lsurfaceFilmModels
|
-lsurfaceFilmModels
|
||||||
|
|||||||
@ -17,7 +17,8 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
|
||||||
-I$(LIB_SRC)/surfaceFilmModels/lnInclude \
|
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||||
|
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
|
||||||
-I$(LIB_SRC)/ODE/lnInclude
|
-I$(LIB_SRC)/ODE/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
@ -40,5 +41,6 @@ EXE_LIBS = \
|
|||||||
-lSLGThermo \
|
-lSLGThermo \
|
||||||
-lchemistryModel \
|
-lchemistryModel \
|
||||||
-lradiationModels \
|
-lradiationModels \
|
||||||
|
-lregionModels \
|
||||||
-lsurfaceFilmModels \
|
-lsurfaceFilmModels \
|
||||||
-lODE
|
-lODE
|
||||||
|
|||||||
@ -11,7 +11,8 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/surfaceFilmModels/lnInclude \
|
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||||
|
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude
|
-I$(LIB_SRC)/dynamicFvMesh/lnInclude
|
||||||
|
|
||||||
@ -28,6 +29,7 @@ EXE_LIBS = \
|
|||||||
-lincompressibleTransportModels \
|
-lincompressibleTransportModels \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
|
-lregionModels \
|
||||||
-lsurfaceFilmModels \
|
-lsurfaceFilmModels \
|
||||||
-ldynamicMesh \
|
-ldynamicMesh \
|
||||||
-ldynamicFvMesh \
|
-ldynamicFvMesh \
|
||||||
|
|||||||
@ -10,7 +10,8 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/surfaceFilmModels/lnInclude
|
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||||
|
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-llagrangian \
|
-llagrangian \
|
||||||
@ -24,4 +25,5 @@ EXE_LIBS = \
|
|||||||
-lincompressibleTransportModels \
|
-lincompressibleTransportModels \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
|
-lregionModels \
|
||||||
-lsurfaceFilmModels
|
-lsurfaceFilmModels
|
||||||
|
|||||||
@ -18,7 +18,8 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
|
||||||
-I$(LIB_SRC)/ODE/lnInclude \
|
-I$(LIB_SRC)/ODE/lnInclude \
|
||||||
-I$(LIB_SRC)/surfaceFilmModels/lnInclude
|
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||||
|
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
@ -40,4 +41,5 @@ EXE_LIBS = \
|
|||||||
-lchemistryModel \
|
-lchemistryModel \
|
||||||
-lradiationModels \
|
-lradiationModels \
|
||||||
-lODE \
|
-lODE \
|
||||||
|
-lregionModels \
|
||||||
-lsurfaceFilmModels
|
-lsurfaceFilmModels
|
||||||
|
|||||||
@ -14,7 +14,8 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
|
||||||
-I$(LIB_SRC)/surfaceFilmModels/lnInclude \
|
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||||
|
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
|
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
|
||||||
-I$(LIB_SRC)/ODE/lnInclude
|
-I$(LIB_SRC)/ODE/lnInclude
|
||||||
@ -32,6 +33,7 @@ EXE_LIBS = \
|
|||||||
-lreactionThermophysicalModels \
|
-lreactionThermophysicalModels \
|
||||||
-lSLGThermo \
|
-lSLGThermo \
|
||||||
-lchemistryModel \
|
-lchemistryModel \
|
||||||
|
-lregionModels \
|
||||||
-lradiationModels \
|
-lradiationModels \
|
||||||
-lsurfaceFilmModels \
|
-lsurfaceFilmModels \
|
||||||
-llagrangianIntermediate \
|
-llagrangianIntermediate \
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
Info<< "\nConstructing surface film model" << endl;
|
Info<< "\nConstructing surface film model" << endl;
|
||||||
|
|
||||||
autoPtr<surfaceFilmModels::surfaceFilmModel>
|
typedef regionModels::surfaceFilmModels::surfaceFilmModel filmModelType;
|
||||||
tsurfaceFilm(surfaceFilmModels::surfaceFilmModel::New(mesh, g));
|
|
||||||
surfaceFilmModels::surfaceFilmModel& surfaceFilm = tsurfaceFilm();
|
autoPtr<filmModelType> tsurfaceFilm(filmModelType::New(mesh, g));
|
||||||
|
filmModelType& surfaceFilm = tsurfaceFilm();
|
||||||
|
|
||||||
|
|||||||
@ -17,7 +17,8 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
|
||||||
-I$(LIB_SRC)/ODE/lnInclude \
|
-I$(LIB_SRC)/ODE/lnInclude \
|
||||||
-I$(LIB_SRC)/surfaceFilmModels/lnInclude
|
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||||
|
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
@ -39,4 +40,5 @@ EXE_LIBS = \
|
|||||||
-lchemistryModel \
|
-lchemistryModel \
|
||||||
-lradiationModels \
|
-lradiationModels \
|
||||||
-lODE \
|
-lODE \
|
||||||
|
-lregionModels \
|
||||||
-lsurfaceFilmModels
|
-lsurfaceFilmModels
|
||||||
|
|||||||
@ -8,7 +8,8 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/surfaceFilmModels/lnInclude
|
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||||
|
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-llagrangian \
|
-llagrangian \
|
||||||
@ -22,4 +23,5 @@ EXE_LIBS = \
|
|||||||
-lcompressibleLESModels \
|
-lcompressibleLESModels \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
|
-lregionModels \
|
||||||
-lsurfaceFilmModels
|
-lsurfaceFilmModels
|
||||||
|
|||||||
@ -1,296 +0,0 @@
|
|||||||
# Wavefront OBJ file
|
|
||||||
# Regions:
|
|
||||||
# 0 movingWall
|
|
||||||
# 1 fixedWalls
|
|
||||||
# 2 frontAndBack
|
|
||||||
#
|
|
||||||
# points : 96
|
|
||||||
# triangles : 188
|
|
||||||
#
|
|
||||||
v 0.1 0.1 0.5
|
|
||||||
v 0.1 0.1 0.5625
|
|
||||||
v 0.16 0.1 0.5625
|
|
||||||
v 0.16 0.1 0.5
|
|
||||||
v 0.1 0.1 0.625
|
|
||||||
v 0.16 0.1 0.625
|
|
||||||
v 0.1 0.1 0.6875
|
|
||||||
v 0.16 0.1 0.6875
|
|
||||||
v 0.1 0.1 0.75
|
|
||||||
v 0.16 0.1 0.75
|
|
||||||
v 0.22 0.1 0.5625
|
|
||||||
v 0.22 0.1 0.5
|
|
||||||
v 0.22 0.1 0.625
|
|
||||||
v 0.22 0.1 0.6875
|
|
||||||
v 0.22 0.1 0.75
|
|
||||||
v 0.28 0.1 0.5625
|
|
||||||
v 0.28 0.1 0.5
|
|
||||||
v 0.28 0.1 0.625
|
|
||||||
v 0.28 0.1 0.6875
|
|
||||||
v 0.28 0.1 0.75
|
|
||||||
v 0.34 0.1 0.5625
|
|
||||||
v 0.34 0.1 0.5
|
|
||||||
v 0.34 0.1 0.625
|
|
||||||
v 0.34 0.1 0.6875
|
|
||||||
v 0.34 0.1 0.75
|
|
||||||
v 0.4 0.1 0.5625
|
|
||||||
v 0.4 0.1 0.5
|
|
||||||
v 0.4 0.1 0.625
|
|
||||||
v 0.4 0.1 0.6875
|
|
||||||
v 0.4 0.1 0.75
|
|
||||||
v 0.1 -0.3 0.5
|
|
||||||
v 0.1 -0.3 0.5625
|
|
||||||
v 0.1 -0.166667 0.5625
|
|
||||||
v 0.1 -0.166667 0.5
|
|
||||||
v 0.1 -0.0333333 0.5625
|
|
||||||
v 0.1 -0.0333333 0.5
|
|
||||||
v 0.1 -0.3 0.625
|
|
||||||
v 0.1 -0.166667 0.625
|
|
||||||
v 0.1 -0.0333333 0.625
|
|
||||||
v 0.1 -0.3 0.6875
|
|
||||||
v 0.1 -0.166667 0.6875
|
|
||||||
v 0.1 -0.0333333 0.6875
|
|
||||||
v 0.1 -0.3 0.75
|
|
||||||
v 0.1 -0.166667 0.75
|
|
||||||
v 0.1 -0.0333333 0.75
|
|
||||||
v 0.4 -0.3 0.5
|
|
||||||
v 0.4 -0.166667 0.5
|
|
||||||
v 0.4 -0.166667 0.5625
|
|
||||||
v 0.4 -0.3 0.5625
|
|
||||||
v 0.4 -0.0333333 0.5
|
|
||||||
v 0.4 -0.0333333 0.5625
|
|
||||||
v 0.4 -0.166667 0.625
|
|
||||||
v 0.4 -0.3 0.625
|
|
||||||
v 0.4 -0.0333333 0.625
|
|
||||||
v 0.4 -0.166667 0.6875
|
|
||||||
v 0.4 -0.3 0.6875
|
|
||||||
v 0.4 -0.0333333 0.6875
|
|
||||||
v 0.4 -0.166667 0.75
|
|
||||||
v 0.4 -0.3 0.75
|
|
||||||
v 0.4 -0.0333333 0.75
|
|
||||||
v 0.16 -0.3 0.5
|
|
||||||
v 0.16 -0.3 0.5625
|
|
||||||
v 0.16 -0.3 0.625
|
|
||||||
v 0.16 -0.3 0.6875
|
|
||||||
v 0.16 -0.3 0.75
|
|
||||||
v 0.22 -0.3 0.5
|
|
||||||
v 0.22 -0.3 0.5625
|
|
||||||
v 0.22 -0.3 0.625
|
|
||||||
v 0.22 -0.3 0.6875
|
|
||||||
v 0.22 -0.3 0.75
|
|
||||||
v 0.28 -0.3 0.5
|
|
||||||
v 0.28 -0.3 0.5625
|
|
||||||
v 0.28 -0.3 0.625
|
|
||||||
v 0.28 -0.3 0.6875
|
|
||||||
v 0.28 -0.3 0.75
|
|
||||||
v 0.34 -0.3 0.5
|
|
||||||
v 0.34 -0.3 0.5625
|
|
||||||
v 0.34 -0.3 0.625
|
|
||||||
v 0.34 -0.3 0.6875
|
|
||||||
v 0.34 -0.3 0.75
|
|
||||||
v 0.16 -0.166667 0.5
|
|
||||||
v 0.16 -0.0333333 0.5
|
|
||||||
v 0.22 -0.166667 0.5
|
|
||||||
v 0.22 -0.0333333 0.5
|
|
||||||
v 0.28 -0.166667 0.5
|
|
||||||
v 0.28 -0.0333333 0.5
|
|
||||||
v 0.34 -0.166667 0.5
|
|
||||||
v 0.34 -0.0333333 0.5
|
|
||||||
v 0.16 -0.166667 0.75
|
|
||||||
v 0.16 -0.0333333 0.75
|
|
||||||
v 0.22 -0.166667 0.75
|
|
||||||
v 0.22 -0.0333333 0.75
|
|
||||||
v 0.28 -0.166667 0.75
|
|
||||||
v 0.28 -0.0333333 0.75
|
|
||||||
v 0.34 -0.166667 0.75
|
|
||||||
v 0.34 -0.0333333 0.75
|
|
||||||
g movingWall
|
|
||||||
f 1 2 3
|
|
||||||
f 3 4 1
|
|
||||||
f 2 5 6
|
|
||||||
f 6 3 2
|
|
||||||
f 5 7 8
|
|
||||||
f 8 6 5
|
|
||||||
f 7 9 10
|
|
||||||
f 10 8 7
|
|
||||||
f 4 3 11
|
|
||||||
f 11 12 4
|
|
||||||
f 3 6 13
|
|
||||||
f 13 11 3
|
|
||||||
f 6 8 14
|
|
||||||
f 14 13 6
|
|
||||||
f 8 10 15
|
|
||||||
f 15 14 8
|
|
||||||
f 12 11 16
|
|
||||||
f 16 17 12
|
|
||||||
f 11 13 18
|
|
||||||
f 18 16 11
|
|
||||||
f 13 14 19
|
|
||||||
f 19 18 13
|
|
||||||
f 14 15 20
|
|
||||||
f 20 19 14
|
|
||||||
f 17 16 21
|
|
||||||
f 21 22 17
|
|
||||||
f 16 18 23
|
|
||||||
f 23 21 16
|
|
||||||
f 18 19 24
|
|
||||||
f 24 23 18
|
|
||||||
f 19 20 25
|
|
||||||
f 25 24 19
|
|
||||||
f 22 21 26
|
|
||||||
f 26 27 22
|
|
||||||
f 21 23 28
|
|
||||||
f 28 26 21
|
|
||||||
f 23 24 29
|
|
||||||
f 29 28 23
|
|
||||||
f 24 25 30
|
|
||||||
f 30 29 24
|
|
||||||
g fixedWalls
|
|
||||||
f 31 32 33
|
|
||||||
f 33 34 31
|
|
||||||
f 34 33 35
|
|
||||||
f 35 36 34
|
|
||||||
f 36 35 2
|
|
||||||
f 2 1 36
|
|
||||||
f 32 37 38
|
|
||||||
f 38 33 32
|
|
||||||
f 33 38 39
|
|
||||||
f 39 35 33
|
|
||||||
f 35 39 5
|
|
||||||
f 5 2 35
|
|
||||||
f 37 40 41
|
|
||||||
f 41 38 37
|
|
||||||
f 38 41 42
|
|
||||||
f 42 39 38
|
|
||||||
f 39 42 7
|
|
||||||
f 7 5 39
|
|
||||||
f 40 43 44
|
|
||||||
f 44 41 40
|
|
||||||
f 41 44 45
|
|
||||||
f 45 42 41
|
|
||||||
f 42 45 9
|
|
||||||
f 9 7 42
|
|
||||||
f 46 47 48
|
|
||||||
f 48 49 46
|
|
||||||
f 47 50 51
|
|
||||||
f 51 48 47
|
|
||||||
f 50 27 26
|
|
||||||
f 26 51 50
|
|
||||||
f 49 48 52
|
|
||||||
f 52 53 49
|
|
||||||
f 48 51 54
|
|
||||||
f 54 52 48
|
|
||||||
f 51 26 28
|
|
||||||
f 28 54 51
|
|
||||||
f 53 52 55
|
|
||||||
f 55 56 53
|
|
||||||
f 52 54 57
|
|
||||||
f 57 55 52
|
|
||||||
f 54 28 29
|
|
||||||
f 29 57 54
|
|
||||||
f 56 55 58
|
|
||||||
f 58 59 56
|
|
||||||
f 55 57 60
|
|
||||||
f 60 58 55
|
|
||||||
f 57 29 30
|
|
||||||
f 30 60 57
|
|
||||||
f 31 61 62
|
|
||||||
f 62 32 31
|
|
||||||
f 32 62 63
|
|
||||||
f 63 37 32
|
|
||||||
f 37 63 64
|
|
||||||
f 64 40 37
|
|
||||||
f 40 64 65
|
|
||||||
f 65 43 40
|
|
||||||
f 61 66 67
|
|
||||||
f 67 62 61
|
|
||||||
f 62 67 68
|
|
||||||
f 68 63 62
|
|
||||||
f 63 68 69
|
|
||||||
f 69 64 63
|
|
||||||
f 64 69 70
|
|
||||||
f 70 65 64
|
|
||||||
f 66 71 72
|
|
||||||
f 72 67 66
|
|
||||||
f 67 72 73
|
|
||||||
f 73 68 67
|
|
||||||
f 68 73 74
|
|
||||||
f 74 69 68
|
|
||||||
f 69 74 75
|
|
||||||
f 75 70 69
|
|
||||||
f 71 76 77
|
|
||||||
f 77 72 71
|
|
||||||
f 72 77 78
|
|
||||||
f 78 73 72
|
|
||||||
f 73 78 79
|
|
||||||
f 79 74 73
|
|
||||||
f 74 79 80
|
|
||||||
f 80 75 74
|
|
||||||
f 76 46 49
|
|
||||||
f 49 77 76
|
|
||||||
f 77 49 53
|
|
||||||
f 53 78 77
|
|
||||||
f 78 53 56
|
|
||||||
f 56 79 78
|
|
||||||
f 79 56 59
|
|
||||||
f 59 80 79
|
|
||||||
g frontAndBack
|
|
||||||
f 31 34 81
|
|
||||||
f 81 61 31
|
|
||||||
f 34 36 82
|
|
||||||
f 82 81 34
|
|
||||||
f 36 1 4
|
|
||||||
f 4 82 36
|
|
||||||
f 61 81 83
|
|
||||||
f 83 66 61
|
|
||||||
f 81 82 84
|
|
||||||
f 84 83 81
|
|
||||||
f 82 4 12
|
|
||||||
f 12 84 82
|
|
||||||
f 66 83 85
|
|
||||||
f 85 71 66
|
|
||||||
f 83 84 86
|
|
||||||
f 86 85 83
|
|
||||||
f 84 12 17
|
|
||||||
f 17 86 84
|
|
||||||
f 71 85 87
|
|
||||||
f 87 76 71
|
|
||||||
f 85 86 88
|
|
||||||
f 88 87 85
|
|
||||||
f 86 17 22
|
|
||||||
f 22 88 86
|
|
||||||
f 76 87 47
|
|
||||||
f 47 46 76
|
|
||||||
f 87 88 50
|
|
||||||
f 50 47 87
|
|
||||||
f 88 22 27
|
|
||||||
f 27 50 88
|
|
||||||
f 43 65 89
|
|
||||||
f 89 44 43
|
|
||||||
f 44 89 90
|
|
||||||
f 90 45 44
|
|
||||||
f 45 90 10
|
|
||||||
f 10 9 45
|
|
||||||
f 65 70 91
|
|
||||||
f 91 89 65
|
|
||||||
f 89 91 92
|
|
||||||
f 92 90 89
|
|
||||||
f 90 92 15
|
|
||||||
f 15 10 90
|
|
||||||
f 70 75 93
|
|
||||||
f 93 91 70
|
|
||||||
f 91 93 94
|
|
||||||
f 94 92 91
|
|
||||||
f 92 94 20
|
|
||||||
f 20 15 92
|
|
||||||
f 75 80 95
|
|
||||||
f 95 93 75
|
|
||||||
f 93 95 96
|
|
||||||
f 96 94 93
|
|
||||||
f 94 96 25
|
|
||||||
f 25 20 94
|
|
||||||
f 80 59 58
|
|
||||||
f 58 95 80
|
|
||||||
f 95 58 60
|
|
||||||
f 60 96 95
|
|
||||||
f 96 60 30
|
|
||||||
f 30 25 96
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -327,10 +327,36 @@ int main(int argc, char *argv[])
|
|||||||
showTransform = false;
|
showTransform = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// calculate the total surface area
|
||||||
|
|
||||||
|
scalar surfaceArea = 0;
|
||||||
|
|
||||||
|
forAll(surf, faceI)
|
||||||
|
{
|
||||||
|
const labelledTri& f = surf[faceI];
|
||||||
|
|
||||||
|
if (f[0] == f[1] || f[0] == f[2] || f[1] == f[2])
|
||||||
|
{
|
||||||
|
WarningIn(args.executable())
|
||||||
|
<< "Illegal triangle " << faceI << " vertices " << f
|
||||||
|
<< " coords " << f.points(surf.points()) << endl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
surfaceArea += triPointRef
|
||||||
|
(
|
||||||
|
surf.points()[f[0]],
|
||||||
|
surf.points()[f[1]],
|
||||||
|
surf.points()[f[2]]
|
||||||
|
).mag();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Info<< nl << setprecision(12)
|
Info<< nl << setprecision(12)
|
||||||
<< "Density: " << density << nl
|
<< "Density: " << density << nl
|
||||||
<< "Mass: " << m << nl
|
<< "Mass: " << m << nl
|
||||||
<< "Centre of mass: " << cM << nl
|
<< "Centre of mass: " << cM << nl
|
||||||
|
<< "Surface area: " << surfaceArea << nl
|
||||||
<< "Inertia tensor around centre of mass: " << nl << J << nl
|
<< "Inertia tensor around centre of mass: " << nl << J << nl
|
||||||
<< "eigenValues (principal moments): " << eVal << nl
|
<< "eigenValues (principal moments): " << eVal << nl
|
||||||
<< "eigenVectors (principal axes): " << nl
|
<< "eigenVectors (principal axes): " << nl
|
||||||
|
|||||||
@ -60,7 +60,7 @@ wmake $makeType randomProcesses
|
|||||||
thermophysicalModels/Allwmake $*
|
thermophysicalModels/Allwmake $*
|
||||||
transportModels/Allwmake $*
|
transportModels/Allwmake $*
|
||||||
turbulenceModels/Allwmake $*
|
turbulenceModels/Allwmake $*
|
||||||
wmake $makeType surfaceFilmModels
|
regionModels/Allwmake $*
|
||||||
lagrangian/Allwmake $*
|
lagrangian/Allwmake $*
|
||||||
postProcessing/Allwmake $*
|
postProcessing/Allwmake $*
|
||||||
mesh/Allwmake $*
|
mesh/Allwmake $*
|
||||||
|
|||||||
@ -114,8 +114,10 @@ derivedFvPatchFields = $(fvPatchFields)/derived
|
|||||||
$(derivedFvPatchFields)/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C
|
$(derivedFvPatchFields)/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C
|
||||||
$(derivedFvPatchFields)/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C
|
$(derivedFvPatchFields)/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C
|
||||||
$(derivedFvPatchFields)/advective/advectiveFvPatchFields.C
|
$(derivedFvPatchFields)/advective/advectiveFvPatchFields.C
|
||||||
|
|
||||||
$(derivedFvPatchFields)/codedFixedValue/codedFixedValueFvPatchScalarField.C
|
$(derivedFvPatchFields)/codedFixedValue/codedFixedValueFvPatchScalarField.C
|
||||||
|
$(derivedFvPatchFields)/directMappedField/directMappedFieldFvPatchFields.C
|
||||||
|
$(derivedFvPatchFields)/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFields.C
|
||||||
|
$(derivedFvPatchFields)/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFields.C
|
||||||
$(derivedFvPatchFields)/directMappedFixedValue/directMappedFixedValueFvPatchFields.C
|
$(derivedFvPatchFields)/directMappedFixedValue/directMappedFixedValueFvPatchFields.C
|
||||||
$(derivedFvPatchFields)/directMappedVelocityFluxFixedValue/directMappedVelocityFluxFixedValueFvPatchField.C
|
$(derivedFvPatchFields)/directMappedVelocityFluxFixedValue/directMappedVelocityFluxFixedValueFvPatchField.C
|
||||||
$(derivedFvPatchFields)/fan/fanFvPatchFields.C
|
$(derivedFvPatchFields)/fan/fanFvPatchFields.C
|
||||||
@ -217,6 +219,7 @@ $(surfaceInterpolation)/surfaceInterpolationScheme/surfaceInterpolationSchemes.C
|
|||||||
|
|
||||||
schemes = $(surfaceInterpolation)/schemes
|
schemes = $(surfaceInterpolation)/schemes
|
||||||
$(schemes)/linear/linear.C
|
$(schemes)/linear/linear.C
|
||||||
|
$(schemes)/pointLinear/pointLinear.C
|
||||||
$(schemes)/midPoint/midPoint.C
|
$(schemes)/midPoint/midPoint.C
|
||||||
$(schemes)/downwind/downwind.C
|
$(schemes)/downwind/downwind.C
|
||||||
$(schemes)/weighted/weighted.C
|
$(schemes)/weighted/weighted.C
|
||||||
|
|||||||
@ -0,0 +1,313 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
|
\\/ 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 "directMappedFieldFvPatchField.H"
|
||||||
|
|
||||||
|
#include "volFields.H"
|
||||||
|
#include "interpolationCell.H"
|
||||||
|
#include "mapDistribute.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
directMappedFieldFvPatchField<Type>::directMappedFieldFvPatchField
|
||||||
|
(
|
||||||
|
const fvPatch& p,
|
||||||
|
const DimensionedField<Type, volMesh>& iF
|
||||||
|
)
|
||||||
|
:
|
||||||
|
directMappedPatchBase(p.patch()),
|
||||||
|
fixedValueFvPatchField<Type>(p, iF),
|
||||||
|
fieldName_(iF.name()),
|
||||||
|
setAverage_(false),
|
||||||
|
average_(pTraits<Type>::zero)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
directMappedFieldFvPatchField<Type>::directMappedFieldFvPatchField
|
||||||
|
(
|
||||||
|
const directMappedFieldFvPatchField<Type>& ptf,
|
||||||
|
const fvPatch& p,
|
||||||
|
const DimensionedField<Type, volMesh>& iF,
|
||||||
|
const fvPatchFieldMapper& mapper
|
||||||
|
)
|
||||||
|
:
|
||||||
|
directMappedPatchBase(p.patch(), ptf),
|
||||||
|
fixedValueFvPatchField<Type>(ptf, p, iF, mapper),
|
||||||
|
fieldName_(ptf.fieldName_),
|
||||||
|
setAverage_(ptf.setAverage_),
|
||||||
|
average_(ptf.average_)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
directMappedFieldFvPatchField<Type>::directMappedFieldFvPatchField
|
||||||
|
(
|
||||||
|
const fvPatch& p,
|
||||||
|
const DimensionedField<Type, volMesh>& iF,
|
||||||
|
const dictionary& dict
|
||||||
|
)
|
||||||
|
:
|
||||||
|
directMappedPatchBase(p.patch(), dict),
|
||||||
|
fixedValueFvPatchField<Type>(p, iF, dict),
|
||||||
|
fieldName_(dict.template lookupOrDefault<word>("fieldName", iF.name())),
|
||||||
|
setAverage_(readBool(dict.lookup("setAverage"))),
|
||||||
|
average_(pTraits<Type>(dict.lookup("average")))
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
directMappedFieldFvPatchField<Type>::directMappedFieldFvPatchField
|
||||||
|
(
|
||||||
|
const fvPatch& p,
|
||||||
|
const DimensionedField<Type, volMesh>& iF,
|
||||||
|
|
||||||
|
// directMappedPatchBase
|
||||||
|
const word& sampleRegion,
|
||||||
|
const sampleMode sampleMode,
|
||||||
|
const word& samplePatch,
|
||||||
|
const scalar distance,
|
||||||
|
|
||||||
|
// My settings
|
||||||
|
const word& fieldName,
|
||||||
|
const bool setAverage,
|
||||||
|
const Type average
|
||||||
|
)
|
||||||
|
:
|
||||||
|
directMappedPatchBase
|
||||||
|
(
|
||||||
|
p.patch(),
|
||||||
|
sampleRegion,
|
||||||
|
sampleMode,
|
||||||
|
samplePatch,
|
||||||
|
distance
|
||||||
|
),
|
||||||
|
fixedValueFvPatchField<Type>(p, iF),
|
||||||
|
fieldName_(fieldName),
|
||||||
|
setAverage_(setAverage),
|
||||||
|
average_(average)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
directMappedFieldFvPatchField<Type>::directMappedFieldFvPatchField
|
||||||
|
(
|
||||||
|
const directMappedFieldFvPatchField<Type>& ptf
|
||||||
|
)
|
||||||
|
:
|
||||||
|
directMappedPatchBase(ptf.patch().patch(), ptf),
|
||||||
|
fixedValueFvPatchField<Type>(ptf),
|
||||||
|
fieldName_(ptf.fieldName_),
|
||||||
|
setAverage_(ptf.setAverage_),
|
||||||
|
average_(ptf.average_)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
directMappedFieldFvPatchField<Type>::directMappedFieldFvPatchField
|
||||||
|
(
|
||||||
|
const directMappedFieldFvPatchField<Type>& ptf,
|
||||||
|
const DimensionedField<Type, volMesh>& iF
|
||||||
|
)
|
||||||
|
:
|
||||||
|
directMappedPatchBase(ptf.patch().patch(), ptf),
|
||||||
|
fixedValueFvPatchField<Type>(ptf, iF),
|
||||||
|
fieldName_(ptf.fieldName_),
|
||||||
|
setAverage_(ptf.setAverage_),
|
||||||
|
average_(ptf.average_)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
const GeometricField<Type, fvPatchField, volMesh>&
|
||||||
|
directMappedFieldFvPatchField<Type>::sampleField() const
|
||||||
|
{
|
||||||
|
typedef GeometricField<Type, fvPatchField, volMesh> fieldType;
|
||||||
|
|
||||||
|
const fvMesh& nbrMesh = refCast<const fvMesh>(sampleMesh());
|
||||||
|
|
||||||
|
if (sameRegion())
|
||||||
|
{
|
||||||
|
if (fieldName_ == this->dimensionedInternalField().name())
|
||||||
|
{
|
||||||
|
// Optimisation: bypass field lookup
|
||||||
|
return
|
||||||
|
dynamic_cast<const fieldType&>
|
||||||
|
(
|
||||||
|
this->dimensionedInternalField()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const fvMesh& thisMesh = this->patch().boundaryMesh().mesh();
|
||||||
|
return thisMesh.template lookupObject<fieldType>(fieldName_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return nbrMesh.template lookupObject<fieldType>(fieldName_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void directMappedFieldFvPatchField<Type>::updateCoeffs()
|
||||||
|
{
|
||||||
|
if (this->updated())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
typedef GeometricField<Type, fvPatchField, volMesh> fieldType;
|
||||||
|
|
||||||
|
const fvMesh& nbrMesh = refCast<const fvMesh>(sampleMesh());
|
||||||
|
const mapDistribute& distMap = directMappedPatchBase::map();
|
||||||
|
|
||||||
|
// Result of obtaining remote values
|
||||||
|
Field<Type> newValues;
|
||||||
|
|
||||||
|
switch (mode())
|
||||||
|
{
|
||||||
|
case NEARESTCELL:
|
||||||
|
{
|
||||||
|
newValues = sampleField();
|
||||||
|
|
||||||
|
distMap.distribute(newValues);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case NEARESTPATCHFACE:
|
||||||
|
{
|
||||||
|
const label nbrPatchID = nbrMesh.boundaryMesh().findPatchID
|
||||||
|
(
|
||||||
|
samplePatch()
|
||||||
|
);
|
||||||
|
if (nbrPatchID < 0)
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"void directMappedFieldFvPatchField<Type>::updateCoeffs()"
|
||||||
|
)<< "Unable to find sample patch " << samplePatch()
|
||||||
|
<< " in region " << sampleRegion()
|
||||||
|
<< " for patch " << this->patch().name() << nl
|
||||||
|
<< abort(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
|
const fieldType& nbrField = sampleField();
|
||||||
|
|
||||||
|
newValues = nbrField.boundaryField()[nbrPatchID];
|
||||||
|
distMap.distribute(newValues);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case NEARESTFACE:
|
||||||
|
{
|
||||||
|
Field<Type> allValues(nbrMesh.nFaces(), pTraits<Type>::zero);
|
||||||
|
|
||||||
|
const fieldType& nbrField = sampleField();
|
||||||
|
|
||||||
|
forAll(nbrField.boundaryField(), patchI)
|
||||||
|
{
|
||||||
|
const fvPatchField<Type>& pf =
|
||||||
|
nbrField.boundaryField()[patchI];
|
||||||
|
label faceStart = pf.patch().patch().start();
|
||||||
|
|
||||||
|
forAll(pf, faceI)
|
||||||
|
{
|
||||||
|
allValues[faceStart++] = pf[faceI];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
distMap.distribute(allValues);
|
||||||
|
|
||||||
|
newValues.transfer(allValues);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
FatalErrorIn("directMappedFieldFvPatchField<Type>::updateCoeffs()")
|
||||||
|
<< "Unknown sampling mode: " << mode()
|
||||||
|
<< nl << abort(FatalError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (setAverage_)
|
||||||
|
{
|
||||||
|
Type averagePsi =
|
||||||
|
gSum(this->patch().magSf()*newValues)
|
||||||
|
/gSum(this->patch().magSf());
|
||||||
|
|
||||||
|
if (mag(averagePsi)/mag(average_) > 0.5)
|
||||||
|
{
|
||||||
|
newValues *= mag(average_)/mag(averagePsi);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newValues += (average_ - averagePsi);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this->operator==(newValues);
|
||||||
|
|
||||||
|
if (debug)
|
||||||
|
{
|
||||||
|
Info<< "operating on field:" << this->dimensionedInternalField().name()
|
||||||
|
<< " patch:" << this->patch().name()
|
||||||
|
<< " avg:" << gAverage(*this)
|
||||||
|
<< " min:" << gMin(*this)
|
||||||
|
<< " max:" << gMax(*this)
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
fixedValueFvPatchField<Type>::updateCoeffs();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void directMappedFieldFvPatchField<Type>::write(Ostream& os) const
|
||||||
|
{
|
||||||
|
fvPatchField<Type>::write(os);
|
||||||
|
directMappedPatchBase::write(os);
|
||||||
|
os.writeKeyword("fieldName") << fieldName_ << token::END_STATEMENT << nl;
|
||||||
|
os.writeKeyword("setAverage") << setAverage_ << token::END_STATEMENT << nl;
|
||||||
|
os.writeKeyword("average") << average_ << token::END_STATEMENT << nl;
|
||||||
|
this->writeEntry("value", os);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,201 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
|
\\/ 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/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::directMappedFieldFvPatchField
|
||||||
|
|
||||||
|
Description
|
||||||
|
Self-contained version of directMapped. Does not use information on
|
||||||
|
patch, instead holds it locally (and possibly duplicate) so use
|
||||||
|
normal directMapped in preference and only use this if you cannot
|
||||||
|
change the underlying patch type to directMapped.
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
directMappedFieldFvPatchField.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef directMappedFieldFvPatchField_H
|
||||||
|
#define directMappedFieldFvPatchField_H
|
||||||
|
|
||||||
|
#include "directMappedPatchBase.H"
|
||||||
|
#include "fixedValueFvPatchFields.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class directMappedFieldFvPatchField Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
class directMappedFieldFvPatchField
|
||||||
|
:
|
||||||
|
public directMappedPatchBase,
|
||||||
|
public fixedValueFvPatchField<Type>
|
||||||
|
{
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
//- Name of field to sample - defaults to field associated with this
|
||||||
|
// patchField if not specified
|
||||||
|
word fieldName_;
|
||||||
|
|
||||||
|
//- If true adjust the mapped field to maintain average value average_
|
||||||
|
const bool setAverage_;
|
||||||
|
|
||||||
|
//- Average value the mapped field is adjusted to maintain if
|
||||||
|
// setAverage_ is set true
|
||||||
|
const Type average_;
|
||||||
|
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Field to sample. Either on my or nbr mesh
|
||||||
|
const GeometricField<Type, fvPatchField, volMesh>& sampleField() const;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("directMappedField");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from patch and internal field
|
||||||
|
directMappedFieldFvPatchField
|
||||||
|
(
|
||||||
|
const fvPatch&,
|
||||||
|
const DimensionedField<Type, volMesh>&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct from patch, internal field and dictionary
|
||||||
|
directMappedFieldFvPatchField
|
||||||
|
(
|
||||||
|
const fvPatch&,
|
||||||
|
const DimensionedField<Type, volMesh>&,
|
||||||
|
const dictionary&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct from patch, internal field and distance for normal type
|
||||||
|
// sampling
|
||||||
|
directMappedFieldFvPatchField
|
||||||
|
(
|
||||||
|
const fvPatch&,
|
||||||
|
const DimensionedField<Type, volMesh>&,
|
||||||
|
|
||||||
|
// directMappedPatchBase
|
||||||
|
const word& sampleRegion,
|
||||||
|
const sampleMode sampleMode,
|
||||||
|
const word& samplePatch,
|
||||||
|
const scalar distance,
|
||||||
|
|
||||||
|
// My settings
|
||||||
|
const word& fieldName,
|
||||||
|
const bool setAverage,
|
||||||
|
const Type average
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct by mapping given
|
||||||
|
// directMappedFieldFvPatchField
|
||||||
|
// onto a new patch
|
||||||
|
directMappedFieldFvPatchField
|
||||||
|
(
|
||||||
|
const directMappedFieldFvPatchField<Type>&,
|
||||||
|
const fvPatch&,
|
||||||
|
const DimensionedField<Type, volMesh>&,
|
||||||
|
const fvPatchFieldMapper&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct as copy
|
||||||
|
directMappedFieldFvPatchField
|
||||||
|
(
|
||||||
|
const directMappedFieldFvPatchField<Type>&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct and return a clone
|
||||||
|
virtual tmp<fvPatchField<Type> > clone() const
|
||||||
|
{
|
||||||
|
return tmp<fvPatchField<Type> >
|
||||||
|
(
|
||||||
|
new directMappedFieldFvPatchField<Type>
|
||||||
|
(
|
||||||
|
*this
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Construct as copy setting internal field reference
|
||||||
|
directMappedFieldFvPatchField
|
||||||
|
(
|
||||||
|
const directMappedFieldFvPatchField<Type>&,
|
||||||
|
const DimensionedField<Type, volMesh>&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct and return a clone setting internal field reference
|
||||||
|
virtual tmp<fvPatchField<Type> > clone
|
||||||
|
(
|
||||||
|
const DimensionedField<Type, volMesh>& iF
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
return tmp<fvPatchField<Type> >
|
||||||
|
(
|
||||||
|
new directMappedFieldFvPatchField<Type>
|
||||||
|
(
|
||||||
|
*this,
|
||||||
|
iF
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Member functions
|
||||||
|
|
||||||
|
// Evaluation functions
|
||||||
|
|
||||||
|
//- Update the coefficients associated with the patch field
|
||||||
|
virtual void updateCoeffs();
|
||||||
|
|
||||||
|
|
||||||
|
//- Write
|
||||||
|
virtual void write(Ostream&) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#ifdef NoRepository
|
||||||
|
# include "directMappedFieldFvPatchField.C"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -23,22 +23,21 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "heatTransferModel.H"
|
#include "directMappedFieldFvPatchFields.H"
|
||||||
|
#include "volMesh.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
inline const Foam::surfaceFilmModels::surfaceFilmModel&
|
namespace Foam
|
||||||
Foam::surfaceFilmModels::heatTransferModel::owner() const
|
|
||||||
{
|
{
|
||||||
return owner_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
inline const Foam::dictionary&
|
makePatchFields(directMappedField);
|
||||||
Foam::surfaceFilmModels::heatTransferModel::coeffs() const
|
|
||||||
{
|
|
||||||
return coeffs_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -23,29 +23,27 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "injectionModel.H"
|
#ifndef directMappedFieldFvPatchFields_H
|
||||||
|
#define directMappedFieldFvPatchFields_H
|
||||||
|
|
||||||
|
#include "directMappedFieldFvPatchField.H"
|
||||||
|
#include "fieldTypes.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
inline const Foam::surfaceFilmModels::surfaceFilmModel&
|
namespace Foam
|
||||||
Foam::surfaceFilmModels::injectionModel::owner() const
|
|
||||||
{
|
{
|
||||||
return owner_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
inline const Foam::dictionary&
|
makePatchTypeFieldTypedefs(directMappedField)
|
||||||
Foam::surfaceFilmModels::injectionModel::coeffs() const
|
|
||||||
{
|
|
||||||
return coeffs_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
inline Foam::scalar Foam::surfaceFilmModels::injectionModel::injectedMass()
|
} // End namespace Foam
|
||||||
const
|
|
||||||
{
|
|
||||||
return injectedMass_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -23,29 +23,28 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "surfaceFilmModel.H"
|
#ifndef directMappedFieldFvPatchFieldsFwd_H
|
||||||
|
#define directMappedFieldFvPatchFieldsFwd_H
|
||||||
|
|
||||||
|
#include "fieldTypes.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
inline const Foam::Switch&
|
namespace Foam
|
||||||
Foam::surfaceFilmModels::surfaceFilmModel::active() const
|
|
||||||
{
|
{
|
||||||
return active_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
inline const Foam::dictionary&
|
template<class Type> class directMappedFieldFvPatchField;
|
||||||
Foam::surfaceFilmModels::surfaceFilmModel::coeffs() const
|
|
||||||
{
|
|
||||||
return coeffs_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
makePatchTypeFieldTypedefs(directMappedField)
|
||||||
|
|
||||||
inline const Foam::surfaceFilmModels::surfaceFilmModel::thermoModelType&
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
Foam::surfaceFilmModels::surfaceFilmModel::thermoModel() const
|
|
||||||
{
|
|
||||||
return thermoModel_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,22 +19,18 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "directMappedFixedInternalValueFvPatchField.H"
|
#include "directMappedFixedInternalValueFvPatchField.H"
|
||||||
#include "UIndirectList.H"
|
#include "UIndirectList.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
directMappedFixedInternalValueFvPatchField<Type>::
|
Foam::directMappedFixedInternalValueFvPatchField<Type>::
|
||||||
directMappedFixedInternalValueFvPatchField
|
directMappedFixedInternalValueFvPatchField
|
||||||
(
|
(
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
@ -46,7 +42,7 @@ directMappedFixedInternalValueFvPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
directMappedFixedInternalValueFvPatchField<Type>::
|
Foam::directMappedFixedInternalValueFvPatchField<Type>::
|
||||||
directMappedFixedInternalValueFvPatchField
|
directMappedFixedInternalValueFvPatchField
|
||||||
(
|
(
|
||||||
const directMappedFixedInternalValueFvPatchField<Type>& ptf,
|
const directMappedFixedInternalValueFvPatchField<Type>& ptf,
|
||||||
@ -60,7 +56,7 @@ directMappedFixedInternalValueFvPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
directMappedFixedInternalValueFvPatchField<Type>::
|
Foam::directMappedFixedInternalValueFvPatchField<Type>::
|
||||||
directMappedFixedInternalValueFvPatchField
|
directMappedFixedInternalValueFvPatchField
|
||||||
(
|
(
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
@ -73,7 +69,7 @@ directMappedFixedInternalValueFvPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
directMappedFixedInternalValueFvPatchField<Type>::
|
Foam::directMappedFixedInternalValueFvPatchField<Type>::
|
||||||
directMappedFixedInternalValueFvPatchField
|
directMappedFixedInternalValueFvPatchField
|
||||||
(
|
(
|
||||||
const directMappedFixedInternalValueFvPatchField<Type>& ptf
|
const directMappedFixedInternalValueFvPatchField<Type>& ptf
|
||||||
@ -84,7 +80,7 @@ directMappedFixedInternalValueFvPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
directMappedFixedInternalValueFvPatchField<Type>::
|
Foam::directMappedFixedInternalValueFvPatchField<Type>::
|
||||||
directMappedFixedInternalValueFvPatchField
|
directMappedFixedInternalValueFvPatchField
|
||||||
(
|
(
|
||||||
const directMappedFixedInternalValueFvPatchField<Type>& ptf,
|
const directMappedFixedInternalValueFvPatchField<Type>& ptf,
|
||||||
@ -98,7 +94,7 @@ directMappedFixedInternalValueFvPatchField
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void directMappedFixedInternalValueFvPatchField<Type>::updateCoeffs()
|
void Foam::directMappedFixedInternalValueFvPatchField<Type>::updateCoeffs()
|
||||||
{
|
{
|
||||||
typedef GeometricField<Type, fvPatchField, volMesh> FieldType;
|
typedef GeometricField<Type, fvPatchField, volMesh> FieldType;
|
||||||
|
|
||||||
@ -125,14 +121,22 @@ void directMappedFixedInternalValueFvPatchField<Type>::updateCoeffs()
|
|||||||
|
|
||||||
// Retrieve the neighbour field
|
// Retrieve the neighbour field
|
||||||
const fvPatchField<Type>& nbrField =
|
const fvPatchField<Type>& nbrField =
|
||||||
nbrPatch.lookupPatchField<FieldType, Type>
|
nbrPatch.template lookupPatchField<FieldType, Type>
|
||||||
(
|
(
|
||||||
this->dimensionedInternalField().name()
|
this->dimensionedInternalField().name()
|
||||||
);
|
);
|
||||||
|
|
||||||
// Retrieve the neighbour patch internal field
|
// Retrieve the neighbour patch internal field
|
||||||
Field<Type> nbrIntFld(nbrField.patchInternalField());
|
Field<Type> nbrIntFld = nbrField.patchInternalField();
|
||||||
distMap.distribute(nbrIntFld);
|
mapDistribute::distribute
|
||||||
|
(
|
||||||
|
Pstream::defaultCommsType,
|
||||||
|
distMap.schedule(),
|
||||||
|
distMap.constructSize(),
|
||||||
|
distMap.subMap(), // what to send
|
||||||
|
distMap.constructMap(), // what to receive
|
||||||
|
nbrIntFld
|
||||||
|
);
|
||||||
|
|
||||||
// Assign (this) patch internal field to its neighbour values
|
// Assign (this) patch internal field to its neighbour values
|
||||||
Field<Type>& intFld = const_cast<Field<Type>&>(this->internalField());
|
Field<Type>& intFld = const_cast<Field<Type>&>(this->internalField());
|
||||||
@ -141,14 +145,13 @@ void directMappedFixedInternalValueFvPatchField<Type>::updateCoeffs()
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void directMappedFixedInternalValueFvPatchField<Type>::write(Ostream& os) const
|
void Foam::directMappedFixedInternalValueFvPatchField<Type>::write
|
||||||
|
(
|
||||||
|
Ostream& os
|
||||||
|
) const
|
||||||
{
|
{
|
||||||
directMappedFixedValueFvPatchField<Type>::write(os);
|
directMappedFixedValueFvPatchField<Type>::write(os);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,7 +19,8 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::directMappedFixedInternalValueFvPatchField
|
Foam::directMappedFixedInternalValueFvPatchField
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,7 +19,8 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,7 +19,8 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -36,7 +37,7 @@ namespace Foam
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
makePatchTypeFieldTypedefs(directMappedFixedInternalValue);
|
makePatchTypeFieldTypedefs(directMappedFixedInternalValue)
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,7 +19,8 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -37,7 +38,7 @@ namespace Foam
|
|||||||
|
|
||||||
template<class Type> class directMappedFixedInternalValueFvPatchField;
|
template<class Type> class directMappedFixedInternalValueFvPatchField;
|
||||||
|
|
||||||
makePatchTypeFieldTypedefs(directMappedFixedInternalValue);
|
makePatchTypeFieldTypedefs(directMappedFixedInternalValue)
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,22 +19,18 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "directMappedFixedPushedInternalValueFvPatchField.H"
|
#include "directMappedFixedPushedInternalValueFvPatchField.H"
|
||||||
#include "UIndirectList.H"
|
#include "UIndirectList.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
directMappedFixedPushedInternalValueFvPatchField<Type>::
|
Foam::directMappedFixedPushedInternalValueFvPatchField<Type>::
|
||||||
directMappedFixedPushedInternalValueFvPatchField
|
directMappedFixedPushedInternalValueFvPatchField
|
||||||
(
|
(
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
@ -46,7 +42,7 @@ directMappedFixedPushedInternalValueFvPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
directMappedFixedPushedInternalValueFvPatchField<Type>::
|
Foam::directMappedFixedPushedInternalValueFvPatchField<Type>::
|
||||||
directMappedFixedPushedInternalValueFvPatchField
|
directMappedFixedPushedInternalValueFvPatchField
|
||||||
(
|
(
|
||||||
const directMappedFixedPushedInternalValueFvPatchField<Type>& ptf,
|
const directMappedFixedPushedInternalValueFvPatchField<Type>& ptf,
|
||||||
@ -60,7 +56,7 @@ directMappedFixedPushedInternalValueFvPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
directMappedFixedPushedInternalValueFvPatchField<Type>::
|
Foam::directMappedFixedPushedInternalValueFvPatchField<Type>::
|
||||||
directMappedFixedPushedInternalValueFvPatchField
|
directMappedFixedPushedInternalValueFvPatchField
|
||||||
(
|
(
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
@ -73,7 +69,7 @@ directMappedFixedPushedInternalValueFvPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
directMappedFixedPushedInternalValueFvPatchField<Type>::
|
Foam::directMappedFixedPushedInternalValueFvPatchField<Type>::
|
||||||
directMappedFixedPushedInternalValueFvPatchField
|
directMappedFixedPushedInternalValueFvPatchField
|
||||||
(
|
(
|
||||||
const directMappedFixedPushedInternalValueFvPatchField<Type>& ptf
|
const directMappedFixedPushedInternalValueFvPatchField<Type>& ptf
|
||||||
@ -84,7 +80,7 @@ directMappedFixedPushedInternalValueFvPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
directMappedFixedPushedInternalValueFvPatchField<Type>::
|
Foam::directMappedFixedPushedInternalValueFvPatchField<Type>::
|
||||||
directMappedFixedPushedInternalValueFvPatchField
|
directMappedFixedPushedInternalValueFvPatchField
|
||||||
(
|
(
|
||||||
const directMappedFixedPushedInternalValueFvPatchField<Type>& ptf,
|
const directMappedFixedPushedInternalValueFvPatchField<Type>& ptf,
|
||||||
@ -98,7 +94,8 @@ directMappedFixedPushedInternalValueFvPatchField
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void directMappedFixedPushedInternalValueFvPatchField<Type>::updateCoeffs()
|
void
|
||||||
|
Foam::directMappedFixedPushedInternalValueFvPatchField<Type>::updateCoeffs()
|
||||||
{
|
{
|
||||||
typedef GeometricField<Type, fvPatchField, volMesh> FieldType;
|
typedef GeometricField<Type, fvPatchField, volMesh> FieldType;
|
||||||
|
|
||||||
@ -117,7 +114,7 @@ void directMappedFixedPushedInternalValueFvPatchField<Type>::updateCoeffs()
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void directMappedFixedPushedInternalValueFvPatchField<Type>::write
|
void Foam::directMappedFixedPushedInternalValueFvPatchField<Type>::write
|
||||||
(
|
(
|
||||||
Ostream& os
|
Ostream& os
|
||||||
) const
|
) const
|
||||||
@ -126,8 +123,4 @@ void directMappedFixedPushedInternalValueFvPatchField<Type>::write
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,7 +19,8 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::directMappedFixedPushedInternalValueFvPatchField
|
Foam::directMappedFixedPushedInternalValueFvPatchField
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,7 +19,8 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,7 +19,8 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -36,7 +37,7 @@ namespace Foam
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
makePatchTypeFieldTypedefs(directMappedFixedPushedInternalValue);
|
makePatchTypeFieldTypedefs(directMappedFixedPushedInternalValue)
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,7 +19,8 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -37,7 +38,7 @@ namespace Foam
|
|||||||
|
|
||||||
template<class Type> class directMappedFixedPushedInternalValueFvPatchField;
|
template<class Type> class directMappedFixedPushedInternalValueFvPatchField;
|
||||||
|
|
||||||
makePatchTypeFieldTypedefs(directMappedFixedInternalValue);
|
makePatchTypeFieldTypedefs(directMappedFixedInternalValue)
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -457,12 +457,20 @@ void Foam::MULES::limiter
|
|||||||
tmp<volScalarField::DimensionedInternalField> V0 = mesh.Vsc0();
|
tmp<volScalarField::DimensionedInternalField> V0 = mesh.Vsc0();
|
||||||
|
|
||||||
psiMaxn =
|
psiMaxn =
|
||||||
V*((rho.field()/deltaT - Sp.field())*psiMaxn - Su.field())
|
V
|
||||||
|
*(
|
||||||
|
(rho.field()/deltaT - Sp.field())*psiMaxn
|
||||||
|
- Su.field()
|
||||||
|
)
|
||||||
- (V0().field()/deltaT)*rho.oldTime().field()*psi0
|
- (V0().field()/deltaT)*rho.oldTime().field()*psi0
|
||||||
+ sumPhiBD;
|
+ sumPhiBD;
|
||||||
|
|
||||||
psiMinn =
|
psiMinn =
|
||||||
V*(Su.field() - (rho.field()/deltaT - Sp.field())*psiMinn)
|
V
|
||||||
|
*(
|
||||||
|
Su.field()
|
||||||
|
- (rho.field()/deltaT - Sp.field())*psiMinn
|
||||||
|
)
|
||||||
+ (V0().field()/deltaT)*rho.oldTime().field()*psi0
|
+ (V0().field()/deltaT)*rho.oldTime().field()*psi0
|
||||||
- sumPhiBD;
|
- sumPhiBD;
|
||||||
}
|
}
|
||||||
@ -472,16 +480,17 @@ void Foam::MULES::limiter
|
|||||||
V
|
V
|
||||||
*(
|
*(
|
||||||
(rho.field()/deltaT - Sp.field())*psiMaxn
|
(rho.field()/deltaT - Sp.field())*psiMaxn
|
||||||
- (rho.oldTime().field()/deltaT)*psi0
|
|
||||||
- Su.field()
|
- Su.field()
|
||||||
|
- (rho.oldTime().field()/deltaT)*psi0
|
||||||
)
|
)
|
||||||
+ sumPhiBD;
|
+ sumPhiBD;
|
||||||
|
|
||||||
psiMinn =
|
psiMinn =
|
||||||
V
|
V
|
||||||
*(
|
*(
|
||||||
(rho.field()/deltaT)*psi0
|
Su.field()
|
||||||
- (rho.oldTime().field()/deltaT - Sp.field())*psiMinn + Su.field()
|
- (rho.field()/deltaT - Sp.field())*psiMinn
|
||||||
|
+ (rho.oldTime().field()/deltaT)*psi0
|
||||||
)
|
)
|
||||||
- sumPhiBD;
|
- sumPhiBD;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,111 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
|
\\/ 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 "pointLinear.H"
|
||||||
|
#include "fvMesh.H"
|
||||||
|
#include "volPointInterpolation.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >
|
||||||
|
Foam::pointLinear<Type>::
|
||||||
|
correction
|
||||||
|
(
|
||||||
|
const GeometricField<Type, fvPatchField, volMesh>& vf
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
const fvMesh& mesh = this->mesh();
|
||||||
|
|
||||||
|
GeometricField<Type, pointPatchField, pointMesh> pvf =
|
||||||
|
volPointInterpolation::New(mesh).interpolate(vf);
|
||||||
|
|
||||||
|
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tsfCorr =
|
||||||
|
linearInterpolate(vf);
|
||||||
|
|
||||||
|
Field<Type>& sfCorr = tsfCorr().internalField();
|
||||||
|
|
||||||
|
const pointField& points = mesh.points();
|
||||||
|
const pointField& C = mesh.C().internalField();
|
||||||
|
const faceList& faces = mesh.faces();
|
||||||
|
const scalarField& w = mesh.weights().internalField();
|
||||||
|
const labelList& owner = mesh.owner();
|
||||||
|
const labelList& neighbour = mesh.neighbour();
|
||||||
|
|
||||||
|
forAll(sfCorr, facei)
|
||||||
|
{
|
||||||
|
point pi =
|
||||||
|
w[owner[facei]]*C[owner[facei]]
|
||||||
|
+ (1.0 - w[owner[facei]])*C[neighbour[facei]];
|
||||||
|
|
||||||
|
scalar at = triangle<point, const point&>
|
||||||
|
(
|
||||||
|
pi,
|
||||||
|
points[faces[facei][0]],
|
||||||
|
points[faces[facei][faces[facei].size()-1]]
|
||||||
|
).mag();
|
||||||
|
|
||||||
|
scalar sumAt = at;
|
||||||
|
Type sumPsip = at*(1.0/3.0)*
|
||||||
|
(
|
||||||
|
sfCorr[facei]
|
||||||
|
+ pvf[faces[facei][0]]
|
||||||
|
+ pvf[faces[facei][faces[facei].size()-1]]
|
||||||
|
);
|
||||||
|
|
||||||
|
for (label pointi=1; pointi<faces[facei].size(); pointi++)
|
||||||
|
{
|
||||||
|
at = triangle<point, const point&>
|
||||||
|
(
|
||||||
|
pi,
|
||||||
|
points[faces[facei][pointi]],
|
||||||
|
points[faces[facei][pointi-1]]
|
||||||
|
).mag();
|
||||||
|
|
||||||
|
sumAt += at;
|
||||||
|
sumPsip += at*(1.0/3.0)*
|
||||||
|
(
|
||||||
|
sfCorr[facei]
|
||||||
|
+ pvf[faces[facei][pointi]]
|
||||||
|
+ pvf[faces[facei][pointi-1]]
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
sfCorr[facei] = sumPsip/sumAt - sfCorr[facei];
|
||||||
|
}
|
||||||
|
|
||||||
|
tsfCorr().boundaryField() = pTraits<Type>::zero;
|
||||||
|
|
||||||
|
return tsfCorr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
makeSurfaceInterpolationScheme(pointLinear);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,129 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||||
|
\\/ 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/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
pointLinear
|
||||||
|
|
||||||
|
Description
|
||||||
|
Face-point interpolation scheme class derived from linear and
|
||||||
|
returns linear weighting factors but also applies an explicit correction.
|
||||||
|
|
||||||
|
Uses volPointInterpolation to obtain the field values at the face-points.
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
pointLinear.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef pointLinear_H
|
||||||
|
#define pointLinear_H
|
||||||
|
|
||||||
|
#include "linear.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class pointLinear Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
class pointLinear
|
||||||
|
:
|
||||||
|
public linear<Type>
|
||||||
|
{
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Disallow default bitwise copy construct
|
||||||
|
pointLinear(const pointLinear&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const pointLinear&);
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("pointLinear");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from mesh
|
||||||
|
pointLinear(const fvMesh& mesh)
|
||||||
|
:
|
||||||
|
linear<Type>(mesh)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
//- Construct from mesh and Istream
|
||||||
|
pointLinear
|
||||||
|
(
|
||||||
|
const fvMesh& mesh,
|
||||||
|
Istream&
|
||||||
|
)
|
||||||
|
:
|
||||||
|
linear<Type>(mesh)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
//- Construct from mesh, faceFlux and Istream
|
||||||
|
pointLinear
|
||||||
|
(
|
||||||
|
const fvMesh& mesh,
|
||||||
|
const surfaceScalarField&,
|
||||||
|
Istream&
|
||||||
|
)
|
||||||
|
:
|
||||||
|
linear<Type>(mesh)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
//- Return true if this scheme uses an explicit correction
|
||||||
|
virtual bool corrected() const
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Return the explicit correction to the face-interpolate
|
||||||
|
virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
|
||||||
|
correction
|
||||||
|
(
|
||||||
|
const GeometricField<Type, fvPatchField, volMesh>& vf
|
||||||
|
) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -18,7 +18,8 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \
|
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \
|
||||||
-I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
|
-I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
|
||||||
-I$(LIB_SRC)/turbulenceModels/compressible/LES/lnInclude \
|
-I$(LIB_SRC)/turbulenceModels/compressible/LES/lnInclude \
|
||||||
-I$(LIB_SRC)/surfaceFilmModels/lnInclude
|
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||||
|
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude
|
||||||
|
|
||||||
LIB_LIBS = \
|
LIB_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
@ -36,4 +37,5 @@ LIB_LIBS = \
|
|||||||
-lSLGThermo \
|
-lSLGThermo \
|
||||||
-lcompressibleRASModels \
|
-lcompressibleRASModels \
|
||||||
-lcompressibleLESModels \
|
-lcompressibleLESModels \
|
||||||
|
-lregionModels \
|
||||||
-lsurfaceFilmModels
|
-lsurfaceFilmModels
|
||||||
|
|||||||
@ -17,7 +17,8 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \
|
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \
|
||||||
-I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
|
-I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
|
||||||
-I$(LIB_SRC)/turbulenceModels/compressible/LES/lnInclude \
|
-I$(LIB_SRC)/turbulenceModels/compressible/LES/lnInclude \
|
||||||
-I$(LIB_SRC)/surfaceFilmModels/lnInclude \
|
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||||
|
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude
|
-I$(LIB_SRC)/dynamicFvMesh/lnInclude
|
||||||
|
|
||||||
LIB_LIBS = \
|
LIB_LIBS = \
|
||||||
|
|||||||
@ -24,8 +24,8 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "SurfaceFilmModel.H"
|
#include "SurfaceFilmModel.H"
|
||||||
#include "mathematicalConstants.H"
|
|
||||||
#include "surfaceFilmModel.H"
|
#include "surfaceFilmModel.H"
|
||||||
|
#include "mathematicalConstants.H"
|
||||||
#include "directMappedWallPolyPatch.H"
|
#include "directMappedWallPolyPatch.H"
|
||||||
|
|
||||||
using namespace Foam::constant;
|
using namespace Foam::constant;
|
||||||
@ -133,29 +133,34 @@ void Foam::SurfaceFilmModel<CloudType>::inject(TrackData& td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Retrieve the film model from the owner database
|
// Retrieve the film model from the owner database
|
||||||
const surfaceFilmModels::surfaceFilmModel& filmModel =
|
const regionModels::surfaceFilmModels::surfaceFilmModel& filmModel =
|
||||||
this->owner().db().objectRegistry::template lookupObject
|
this->owner().db().objectRegistry::template lookupObject
|
||||||
<surfaceFilmModels::surfaceFilmModel>
|
<regionModels::surfaceFilmModels::surfaceFilmModel>
|
||||||
(
|
(
|
||||||
"surfaceFilmProperties"
|
"surfaceFilmProperties"
|
||||||
);
|
);
|
||||||
|
|
||||||
const labelList& filmPatches = filmModel.filmBottomPatchIDs();
|
if (!filmModel.active())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const labelList& filmPatches = filmModel.intCoupledPatchIDs();
|
||||||
const labelList& primaryPatches = filmModel.primaryPatchIDs();
|
const labelList& primaryPatches = filmModel.primaryPatchIDs();
|
||||||
|
|
||||||
|
const polyBoundaryMesh& pbm = this->owner().mesh().boundaryMesh();
|
||||||
|
|
||||||
forAll(filmPatches, i)
|
forAll(filmPatches, i)
|
||||||
{
|
{
|
||||||
const label primaryPatchI = primaryPatches[i];
|
|
||||||
const directMappedWallPolyPatch& wpp =
|
|
||||||
refCast<const directMappedWallPolyPatch>
|
|
||||||
(
|
|
||||||
this->owner().mesh().boundaryMesh()[primaryPatchI]
|
|
||||||
);
|
|
||||||
|
|
||||||
const labelList& injectorCellsPatch = wpp.faceCells();
|
|
||||||
|
|
||||||
const label filmPatchI = filmPatches[i];
|
const label filmPatchI = filmPatches[i];
|
||||||
const mapDistribute& distMap = wpp.map();
|
const label primaryPatchI = primaryPatches[i];
|
||||||
|
|
||||||
|
const directMappedPatchBase& mapPatch =
|
||||||
|
filmModel.mappedPatches()[filmPatchI];
|
||||||
|
const mapDistribute& distMap = mapPatch.map();
|
||||||
|
|
||||||
|
const labelList& injectorCellsPatch = pbm[primaryPatchI].faceCells();
|
||||||
|
|
||||||
cacheFilmFields(filmPatchI, primaryPatchI, distMap, filmModel);
|
cacheFilmFields(filmPatchI, primaryPatchI, distMap, filmModel);
|
||||||
|
|
||||||
forAll(injectorCellsPatch, j)
|
forAll(injectorCellsPatch, j)
|
||||||
@ -209,7 +214,7 @@ void Foam::SurfaceFilmModel<CloudType>::cacheFilmFields
|
|||||||
const label filmPatchI,
|
const label filmPatchI,
|
||||||
const label primaryPatchI,
|
const label primaryPatchI,
|
||||||
const mapDistribute& distMap,
|
const mapDistribute& distMap,
|
||||||
const surfaceFilmModels::surfaceFilmModel& filmModel
|
const regionModels::surfaceFilmModels::surfaceFilmModel& filmModel
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
massParcelPatch_ = filmModel.massForPrimary().boundaryField()[filmPatchI];
|
massParcelPatch_ = filmModel.massForPrimary().boundaryField()[filmPatchI];
|
||||||
|
|||||||
@ -47,9 +47,12 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward declaration of classes
|
||||||
namespace surfaceFilmModels
|
namespace regionModels
|
||||||
{
|
{
|
||||||
class surfaceFilmModel;
|
namespace surfaceFilmModels
|
||||||
|
{
|
||||||
|
class surfaceFilmModel;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class mapDistribute;
|
class mapDistribute;
|
||||||
@ -114,7 +117,7 @@ protected:
|
|||||||
const label filmPatchI,
|
const label filmPatchI,
|
||||||
const label primaryPatchI,
|
const label primaryPatchI,
|
||||||
const mapDistribute& distMap,
|
const mapDistribute& distMap,
|
||||||
const surfaceFilmModels::surfaceFilmModel& filmModel
|
const regionModels::surfaceFilmModels::surfaceFilmModel& filmModel
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Set the individual parcel properties
|
//- Set the individual parcel properties
|
||||||
|
|||||||
@ -141,7 +141,7 @@ Foam::vector Foam::ThermoSurfaceFilm<CloudType>::splashDirection
|
|||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
void Foam::ThermoSurfaceFilm<CloudType>::absorbInteraction
|
void Foam::ThermoSurfaceFilm<CloudType>::absorbInteraction
|
||||||
(
|
(
|
||||||
surfaceFilmModels::surfaceFilmModel& filmModel,
|
regionModels::surfaceFilmModels::surfaceFilmModel& filmModel,
|
||||||
const parcelType& p,
|
const parcelType& p,
|
||||||
const polyPatch& pp,
|
const polyPatch& pp,
|
||||||
const label faceI,
|
const label faceI,
|
||||||
@ -218,7 +218,7 @@ void Foam::ThermoSurfaceFilm<CloudType>::bounceInteraction
|
|||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
void Foam::ThermoSurfaceFilm<CloudType>::drySplashInteraction
|
void Foam::ThermoSurfaceFilm<CloudType>::drySplashInteraction
|
||||||
(
|
(
|
||||||
surfaceFilmModels::surfaceFilmModel& filmModel,
|
regionModels::surfaceFilmModels::surfaceFilmModel& filmModel,
|
||||||
const parcelType& p,
|
const parcelType& p,
|
||||||
const polyPatch& pp,
|
const polyPatch& pp,
|
||||||
const label faceI,
|
const label faceI,
|
||||||
@ -274,7 +274,7 @@ void Foam::ThermoSurfaceFilm<CloudType>::drySplashInteraction
|
|||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
void Foam::ThermoSurfaceFilm<CloudType>::wetSplashInteraction
|
void Foam::ThermoSurfaceFilm<CloudType>::wetSplashInteraction
|
||||||
(
|
(
|
||||||
surfaceFilmModels::surfaceFilmModel& filmModel,
|
regionModels::surfaceFilmModels::surfaceFilmModel& filmModel,
|
||||||
parcelType& p,
|
parcelType& p,
|
||||||
const polyPatch& pp,
|
const polyPatch& pp,
|
||||||
const label faceI,
|
const label faceI,
|
||||||
@ -331,6 +331,7 @@ void Foam::ThermoSurfaceFilm<CloudType>::wetSplashInteraction
|
|||||||
U = -epsilon*(Un) + 5/7*(Ut);
|
U = -epsilon*(Un) + 5/7*(Ut);
|
||||||
|
|
||||||
keepParticle = true;
|
keepParticle = true;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else if ((We >= 20) && (We < Wec)) // spread - assume absorb
|
else if ((We >= 20) && (We < Wec)) // spread - assume absorb
|
||||||
{
|
{
|
||||||
@ -350,7 +351,7 @@ void Foam::ThermoSurfaceFilm<CloudType>::wetSplashInteraction
|
|||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
void Foam::ThermoSurfaceFilm<CloudType>::splashInteraction
|
void Foam::ThermoSurfaceFilm<CloudType>::splashInteraction
|
||||||
(
|
(
|
||||||
surfaceFilmModels::surfaceFilmModel& filmModel,
|
regionModels::surfaceFilmModels::surfaceFilmModel& filmModel,
|
||||||
const parcelType& p,
|
const parcelType& p,
|
||||||
const polyPatch& pp,
|
const polyPatch& pp,
|
||||||
const label faceI,
|
const label faceI,
|
||||||
@ -390,8 +391,8 @@ void Foam::ThermoSurfaceFilm<CloudType>::splashInteraction
|
|||||||
const scalar dBarSplash = 1/cbrt(6.0)*cbrt(mRatio/Ns)*d + ROOTVSMALL;
|
const scalar dBarSplash = 1/cbrt(6.0)*cbrt(mRatio/Ns)*d + ROOTVSMALL;
|
||||||
|
|
||||||
// cumulative diameter splash distribution
|
// cumulative diameter splash distribution
|
||||||
const scalar dMin = 0.01*d;
|
const scalar dMax = cbrt(mRatio)*d;
|
||||||
const scalar dMax = d;
|
const scalar dMin = 0.001*dMax;
|
||||||
const scalar K = exp(-dMin/dBarSplash) - exp(-dMax/dBarSplash);
|
const scalar K = exp(-dMin/dBarSplash) - exp(-dMax/dBarSplash);
|
||||||
|
|
||||||
// surface energy of secondary parcels [J]
|
// surface energy of secondary parcels [J]
|
||||||
@ -567,11 +568,11 @@ bool Foam::ThermoSurfaceFilm<CloudType>::transferParcel
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Retrieve the film model from the owner database
|
// Retrieve the film model from the owner database
|
||||||
surfaceFilmModels::surfaceFilmModel& filmModel =
|
regionModels::surfaceFilmModels::surfaceFilmModel& filmModel =
|
||||||
const_cast<surfaceFilmModels::surfaceFilmModel&>
|
const_cast<regionModels::surfaceFilmModels::surfaceFilmModel&>
|
||||||
(
|
(
|
||||||
this->owner().db().objectRegistry::template
|
this->owner().db().objectRegistry::template
|
||||||
lookupObject<surfaceFilmModels::surfaceFilmModel>
|
lookupObject<regionModels::surfaceFilmModels::surfaceFilmModel>
|
||||||
(
|
(
|
||||||
"surfaceFilmProperties"
|
"surfaceFilmProperties"
|
||||||
)
|
)
|
||||||
@ -579,7 +580,7 @@ bool Foam::ThermoSurfaceFilm<CloudType>::transferParcel
|
|||||||
|
|
||||||
const label patchI = pp.index();
|
const label patchI = pp.index();
|
||||||
|
|
||||||
if (filmModel.isFilmPatch(patchI))
|
if (filmModel.isRegionPatch(patchI))
|
||||||
{
|
{
|
||||||
const label faceI = pp.whichFace(p.face());
|
const label faceI = pp.whichFace(p.face());
|
||||||
|
|
||||||
@ -627,10 +628,11 @@ bool Foam::ThermoSurfaceFilm<CloudType>::transferParcel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// transfer parcel/parcel interactions complete
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// do not transfer parcel
|
// parcel not interacting with film
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -641,7 +643,7 @@ void Foam::ThermoSurfaceFilm<CloudType>::cacheFilmFields
|
|||||||
const label filmPatchI,
|
const label filmPatchI,
|
||||||
const label primaryPatchI,
|
const label primaryPatchI,
|
||||||
const mapDistribute& distMap,
|
const mapDistribute& distMap,
|
||||||
const surfaceFilmModels::surfaceFilmModel& filmModel
|
const regionModels::surfaceFilmModels::surfaceFilmModel& filmModel
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
SurfaceFilmModel<CloudType>::cacheFilmFields
|
SurfaceFilmModel<CloudType>::cacheFilmFields
|
||||||
|
|||||||
@ -104,7 +104,7 @@ protected:
|
|||||||
const SLGThermo& thermo_;
|
const SLGThermo& thermo_;
|
||||||
|
|
||||||
|
|
||||||
// Cached injector fields per film patch
|
// Cached injector fields per film patch
|
||||||
|
|
||||||
//- Film temperature / patch face
|
//- Film temperature / patch face
|
||||||
scalarList TFilmPatch_;
|
scalarList TFilmPatch_;
|
||||||
@ -168,7 +168,7 @@ protected:
|
|||||||
//- Absorb parcel into film
|
//- Absorb parcel into film
|
||||||
void absorbInteraction
|
void absorbInteraction
|
||||||
(
|
(
|
||||||
surfaceFilmModels::surfaceFilmModel& filmModel,
|
regionModels::surfaceFilmModels::surfaceFilmModel& filmModel,
|
||||||
const parcelType& p,
|
const parcelType& p,
|
||||||
const polyPatch& pp,
|
const polyPatch& pp,
|
||||||
const label faceI,
|
const label faceI,
|
||||||
@ -188,7 +188,7 @@ protected:
|
|||||||
//- Parcel interaction with dry surface
|
//- Parcel interaction with dry surface
|
||||||
void drySplashInteraction
|
void drySplashInteraction
|
||||||
(
|
(
|
||||||
surfaceFilmModels::surfaceFilmModel& filmModel,
|
regionModels::surfaceFilmModels::surfaceFilmModel& filmModel,
|
||||||
const parcelType& p,
|
const parcelType& p,
|
||||||
const polyPatch& pp,
|
const polyPatch& pp,
|
||||||
const label faceI,
|
const label faceI,
|
||||||
@ -198,7 +198,7 @@ protected:
|
|||||||
//- Parcel interaction with wetted surface
|
//- Parcel interaction with wetted surface
|
||||||
void wetSplashInteraction
|
void wetSplashInteraction
|
||||||
(
|
(
|
||||||
surfaceFilmModels::surfaceFilmModel& filmModel,
|
regionModels::surfaceFilmModels::surfaceFilmModel& filmModel,
|
||||||
parcelType& p,
|
parcelType& p,
|
||||||
const polyPatch& pp,
|
const polyPatch& pp,
|
||||||
const label faceI,
|
const label faceI,
|
||||||
@ -208,7 +208,7 @@ protected:
|
|||||||
//- Bai parcel splash interaction model
|
//- Bai parcel splash interaction model
|
||||||
void splashInteraction
|
void splashInteraction
|
||||||
(
|
(
|
||||||
surfaceFilmModels::surfaceFilmModel& filmModel,
|
regionModels::surfaceFilmModels::surfaceFilmModel& filmModel,
|
||||||
const parcelType& p,
|
const parcelType& p,
|
||||||
const polyPatch& pp,
|
const polyPatch& pp,
|
||||||
const label faceI,
|
const label faceI,
|
||||||
@ -228,7 +228,8 @@ protected:
|
|||||||
const label filmPatchI,
|
const label filmPatchI,
|
||||||
const label primaryPatchI,
|
const label primaryPatchI,
|
||||||
const mapDistribute& distMap,
|
const mapDistribute& distMap,
|
||||||
const surfaceFilmModels::surfaceFilmModel& filmModel
|
const regionModels::surfaceFilmModels::surfaceFilmModel&
|
||||||
|
filmModel
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Set the individual parcel properties
|
//- Set the individual parcel properties
|
||||||
@ -247,7 +248,7 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
ThermoSurfaceFilm
|
ThermoSurfaceFilm
|
||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
|
|||||||
11
src/regionModels/Allwmake
Executable file
11
src/regionModels/Allwmake
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
|
set -x
|
||||||
|
|
||||||
|
wmake libso regionModel
|
||||||
|
#wmake libso pyrolysisModels
|
||||||
|
wmake libso surfaceFilmModels
|
||||||
|
#wmake libso regionCoupling
|
||||||
|
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------- end-of-file
|
||||||
7
src/regionModels/regionModel/Make/files
Normal file
7
src/regionModels/regionModel/Make/files
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
/* Region models */
|
||||||
|
regionModel/regionModel.C
|
||||||
|
singleLayerRegion/singleLayerRegion.C
|
||||||
|
regionModel1D/regionModel1D.C
|
||||||
|
|
||||||
|
|
||||||
|
LIB = $(FOAM_LIBBIN)/libregionModels
|
||||||
7
src/regionModels/regionModel/Make/options
Normal file
7
src/regionModels/regionModel/Make/options
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
EXE_INC = \
|
||||||
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
|
-I$(LIB_SRC)/meshTools/lnInclude
|
||||||
|
|
||||||
|
EXE_LIBS = \
|
||||||
|
-lfiniteVolume \
|
||||||
|
-lmeshTools
|
||||||
283
src/regionModels/regionModel/regionModel/regionModel.C
Normal file
283
src/regionModels/regionModel/regionModel/regionModel.C
Normal file
@ -0,0 +1,283 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
|
\\/ 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 2 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, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "regionModel.H"
|
||||||
|
#include "fvMesh.H"
|
||||||
|
#include "Time.H"
|
||||||
|
#include "directMappedWallPolyPatch.H"
|
||||||
|
#include "zeroGradientFvPatchFields.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(regionModel, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void Foam::regionModels::regionModel::constructMeshObjects()
|
||||||
|
{
|
||||||
|
// construct region mesh
|
||||||
|
regionMeshPtr_.reset
|
||||||
|
(
|
||||||
|
new fvMesh
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
lookup("regionName"),
|
||||||
|
time_.timeName(),
|
||||||
|
time_,
|
||||||
|
IOobject::MUST_READ
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::regionModels::regionModel::initialise()
|
||||||
|
{
|
||||||
|
if (debug)
|
||||||
|
{
|
||||||
|
Pout<< "regionModel::initialise()" << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
label nBoundaryFaces = 0;
|
||||||
|
DynamicList<label> primaryPatchIDs;
|
||||||
|
DynamicList<label> intCoupledPatchIDs;
|
||||||
|
const polyBoundaryMesh& rbm = regionMesh().boundaryMesh();
|
||||||
|
const polyBoundaryMesh& pbm = primaryMesh().boundaryMesh();
|
||||||
|
mappedPatches_.setSize(rbm.size());
|
||||||
|
|
||||||
|
forAll(rbm, patchI)
|
||||||
|
{
|
||||||
|
const polyPatch& regionPatch = rbm[patchI];
|
||||||
|
if (isA<directMappedWallPolyPatch>(regionPatch))
|
||||||
|
{
|
||||||
|
if (debug)
|
||||||
|
{
|
||||||
|
Pout<< "found " << directMappedWallPolyPatch::typeName
|
||||||
|
<< " " << regionPatch.name() << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
intCoupledPatchIDs.append(patchI);
|
||||||
|
|
||||||
|
nBoundaryFaces += regionPatch.faceCells().size();
|
||||||
|
|
||||||
|
const directMappedWallPolyPatch& dmp =
|
||||||
|
refCast<const directMappedWallPolyPatch>(regionPatch);
|
||||||
|
|
||||||
|
const label primaryPatchI = dmp.samplePolyPatch().index();
|
||||||
|
primaryPatchIDs.append(primaryPatchI);
|
||||||
|
|
||||||
|
mappedPatches_.set
|
||||||
|
(
|
||||||
|
patchI,
|
||||||
|
new directMappedPatchBase
|
||||||
|
(
|
||||||
|
pbm[primaryPatchI],
|
||||||
|
regionMesh().name(),
|
||||||
|
directMappedPatchBase::NEARESTPATCHFACE,
|
||||||
|
regionPatch.name(),
|
||||||
|
vector::zero
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
primaryPatchIDs_.transfer(primaryPatchIDs);
|
||||||
|
intCoupledPatchIDs_.transfer(intCoupledPatchIDs);
|
||||||
|
// mappedPatches_.resize(nCoupledPatches);
|
||||||
|
|
||||||
|
if (nBoundaryFaces == 0)
|
||||||
|
{
|
||||||
|
WarningIn("regionModel::initialise()")
|
||||||
|
<< "Region model being applied without direct mapped boundary "
|
||||||
|
<< "conditions" << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
|
bool Foam::regionModels::regionModel::read()
|
||||||
|
{
|
||||||
|
if (regIOobject::read())
|
||||||
|
{
|
||||||
|
if (active_)
|
||||||
|
{
|
||||||
|
if (const dictionary* dictPtr = subDictPtr(modelName_ + "Coeffs"))
|
||||||
|
{
|
||||||
|
coeffs_ <<= *dictPtr;
|
||||||
|
}
|
||||||
|
|
||||||
|
infoOutput_.readIfPresent("infoOutput", *this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::regionModels::regionModel::regionModel(const fvMesh& mesh)
|
||||||
|
:
|
||||||
|
IOdictionary
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"regionModelProperties",
|
||||||
|
mesh.time().constant(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
)
|
||||||
|
),
|
||||||
|
primaryMesh_(mesh),
|
||||||
|
time_(mesh.time()),
|
||||||
|
active_(false),
|
||||||
|
infoOutput_(false),
|
||||||
|
modelName_("none"),
|
||||||
|
regionMeshPtr_(NULL),
|
||||||
|
coeffs_(dictionary::null),
|
||||||
|
primaryPatchIDs_(),
|
||||||
|
intCoupledPatchIDs_(),
|
||||||
|
mappedPatches_()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::regionModels::regionModel::regionModel
|
||||||
|
(
|
||||||
|
const fvMesh& mesh,
|
||||||
|
const word& regionType,
|
||||||
|
const word& modelName,
|
||||||
|
bool readFields
|
||||||
|
)
|
||||||
|
:
|
||||||
|
IOdictionary
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
regionType + "Properties",
|
||||||
|
mesh.time().constant(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
)
|
||||||
|
),
|
||||||
|
primaryMesh_(mesh),
|
||||||
|
time_(mesh.time()),
|
||||||
|
active_(lookup("active")),
|
||||||
|
infoOutput_(true),
|
||||||
|
modelName_(modelName),
|
||||||
|
regionMeshPtr_(NULL),
|
||||||
|
coeffs_(subOrEmptyDict(modelName + "Coeffs")),
|
||||||
|
primaryPatchIDs_(),
|
||||||
|
intCoupledPatchIDs_(),
|
||||||
|
mappedPatches_()
|
||||||
|
{
|
||||||
|
if (active_)
|
||||||
|
{
|
||||||
|
constructMeshObjects();
|
||||||
|
initialise();
|
||||||
|
|
||||||
|
if (readFields)
|
||||||
|
{
|
||||||
|
read();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::regionModels::regionModel::~regionModel()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void Foam::regionModels::regionModel::preEvolveRegion()
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::regionModels::regionModel::evolveRegion()
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::regionModels::regionModel::evolve()
|
||||||
|
{
|
||||||
|
if (active_)
|
||||||
|
{
|
||||||
|
if (primaryMesh_.changing())
|
||||||
|
{
|
||||||
|
FatalErrorIn("regionModel::evolve()")
|
||||||
|
<< "Currently not possible to apply " << modelName_
|
||||||
|
<< " model to moving mesh cases" << nl << abort(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< "\nEvolving " << modelName_ << " for region "
|
||||||
|
<< regionMesh().name() << endl;
|
||||||
|
|
||||||
|
// Update any input information
|
||||||
|
read();
|
||||||
|
|
||||||
|
// Pre-evolve
|
||||||
|
preEvolveRegion();
|
||||||
|
|
||||||
|
// Increment the region equations up to the new time level
|
||||||
|
evolveRegion();
|
||||||
|
|
||||||
|
// Provide some feedback
|
||||||
|
if (infoOutput_)
|
||||||
|
{
|
||||||
|
Info<< incrIndent;
|
||||||
|
info();
|
||||||
|
Info<< endl << decrIndent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::regionModels::regionModel::info() const
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
236
src/regionModels/regionModel/regionModel/regionModel.H
Normal file
236
src/regionModels/regionModel/regionModel/regionModel.H
Normal file
@ -0,0 +1,236 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
|
\\/ 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 2 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, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::regionModel
|
||||||
|
|
||||||
|
Description
|
||||||
|
Base class for region models
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
regionModelI.H
|
||||||
|
regionModel.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef regionModel_H
|
||||||
|
#define regionModel_H
|
||||||
|
|
||||||
|
#include "IOdictionary.H"
|
||||||
|
#include "Switch.H"
|
||||||
|
#include "labelList.H"
|
||||||
|
#include "volFields.H"
|
||||||
|
#include "directMappedPatchBase.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// Forward declaration of classes
|
||||||
|
//class fvMesh;
|
||||||
|
//class Time;
|
||||||
|
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class regionModel Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class regionModel
|
||||||
|
:
|
||||||
|
public IOdictionary
|
||||||
|
{
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Disallow default bitwise copy construct
|
||||||
|
regionModel(const regionModel&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const regionModel&);
|
||||||
|
|
||||||
|
//- Construct region mesh and fields
|
||||||
|
void constructMeshObjects();
|
||||||
|
|
||||||
|
//- Initialise the region
|
||||||
|
void initialise();
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
// Protected data
|
||||||
|
|
||||||
|
//- Reference to the primary mesh database
|
||||||
|
const fvMesh& primaryMesh_;
|
||||||
|
|
||||||
|
//- Reference to the time database
|
||||||
|
const Time& time_;
|
||||||
|
|
||||||
|
//- Active flag
|
||||||
|
Switch active_;
|
||||||
|
|
||||||
|
//- Active information output
|
||||||
|
Switch infoOutput_;
|
||||||
|
|
||||||
|
//- Model name
|
||||||
|
const word modelName_;
|
||||||
|
|
||||||
|
//- Pointer to the region mesh database
|
||||||
|
autoPtr<fvMesh> regionMeshPtr_;
|
||||||
|
|
||||||
|
//- Model coefficients dictionary
|
||||||
|
dictionary coeffs_;
|
||||||
|
|
||||||
|
|
||||||
|
// Addressing
|
||||||
|
|
||||||
|
//- List of patch IDs on the primary region coupled to this region
|
||||||
|
labelList primaryPatchIDs_;
|
||||||
|
|
||||||
|
//- List of patch IDs internally coupled with the primary region
|
||||||
|
labelList intCoupledPatchIDs_;
|
||||||
|
|
||||||
|
//- List of patch map info
|
||||||
|
PtrList<directMappedPatchBase> mappedPatches_;
|
||||||
|
|
||||||
|
|
||||||
|
// Protected member functions
|
||||||
|
|
||||||
|
//- Read control parameters from dictionary
|
||||||
|
virtual bool read();
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("regionModel");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct null
|
||||||
|
regionModel(const fvMesh& mesh);
|
||||||
|
|
||||||
|
//- Construct from mesh, region type and name
|
||||||
|
regionModel
|
||||||
|
(
|
||||||
|
const fvMesh& mesh,
|
||||||
|
const word& regionType,
|
||||||
|
const word& modelName,
|
||||||
|
bool readFields = true
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~regionModel();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
// Access
|
||||||
|
|
||||||
|
//- Return the reference to the primary mesh database
|
||||||
|
inline const fvMesh& primaryMesh() const;
|
||||||
|
|
||||||
|
//- Return the reference to the time database
|
||||||
|
inline const Time& time() const;
|
||||||
|
|
||||||
|
//- Return the active flag
|
||||||
|
inline const Switch& active() const;
|
||||||
|
|
||||||
|
//- Return the model name
|
||||||
|
inline const word& modelName() const;
|
||||||
|
|
||||||
|
//- Return the region mesh database
|
||||||
|
inline const fvMesh& regionMesh() const;
|
||||||
|
|
||||||
|
//- Return the region mesh database for manipulation
|
||||||
|
inline fvMesh& regionMesh();
|
||||||
|
|
||||||
|
//- Return the model coefficients dictionary
|
||||||
|
inline const dictionary& coeffs() const;
|
||||||
|
|
||||||
|
//- Return the solution dictionary
|
||||||
|
inline const dictionary& solution() const;
|
||||||
|
|
||||||
|
|
||||||
|
// Addressing
|
||||||
|
|
||||||
|
//- Return true if patchI on the primary region is a coupled
|
||||||
|
// patch to the local region
|
||||||
|
inline bool isRegionPatch(const label patchI) const;
|
||||||
|
|
||||||
|
//- Return the list of patch IDs on the primary region coupled
|
||||||
|
// to this region
|
||||||
|
inline const labelList& primaryPatchIDs() const;
|
||||||
|
|
||||||
|
//- Return the list of patch IDs internally coupled with the
|
||||||
|
// primary region
|
||||||
|
inline const labelList& intCoupledPatchIDs() const;
|
||||||
|
|
||||||
|
//- Return the list of patch map info
|
||||||
|
inline const PtrList<directMappedPatchBase>&
|
||||||
|
mappedPatches() const;
|
||||||
|
|
||||||
|
//- Return region ID corresponding to primaryPatchID
|
||||||
|
inline label regionPatchID(const label primaryPatchID) const;
|
||||||
|
|
||||||
|
|
||||||
|
// Evolution
|
||||||
|
|
||||||
|
//- Pre-evolve region
|
||||||
|
virtual void preEvolveRegion();
|
||||||
|
|
||||||
|
//- Evolve the region
|
||||||
|
virtual void evolveRegion();
|
||||||
|
|
||||||
|
//- Evolve the film
|
||||||
|
virtual void evolve();
|
||||||
|
|
||||||
|
|
||||||
|
// I-O
|
||||||
|
|
||||||
|
//- Provide some feedback
|
||||||
|
virtual void info() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#include "regionModelI.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
154
src/regionModels/regionModel/regionModel/regionModelI.H
Normal file
154
src/regionModels/regionModel/regionModel/regionModelI.H
Normal file
@ -0,0 +1,154 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
|
\\/ 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 2 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, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "regionModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
inline const Foam::fvMesh&
|
||||||
|
Foam::regionModels::regionModel::primaryMesh() const
|
||||||
|
{
|
||||||
|
return primaryMesh_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline const Foam::Time& Foam::regionModels::regionModel::time() const
|
||||||
|
{
|
||||||
|
return time_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline const Foam::Switch& Foam::regionModels::regionModel::active() const
|
||||||
|
{
|
||||||
|
return active_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline const Foam::word& Foam::regionModels::regionModel::modelName() const
|
||||||
|
{
|
||||||
|
return modelName_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline const Foam::fvMesh& Foam::regionModels::regionModel::regionMesh() const
|
||||||
|
{
|
||||||
|
if (!regionMeshPtr_.valid())
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"inline const Foam::fvMesh&"
|
||||||
|
"Foam::regionModels::regionModel::regionMesh() const"
|
||||||
|
)<< "Region mesh not available" << abort(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
|
return regionMeshPtr_();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline Foam::fvMesh& Foam::regionModels::regionModel::regionMesh()
|
||||||
|
{
|
||||||
|
if (!regionMeshPtr_.valid())
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"inline Foam::fvMesh&"
|
||||||
|
"Foam::regionModels::regionModel::regionMesh()"
|
||||||
|
)<< "Region mesh not available" << abort(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
|
return regionMeshPtr_();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline const Foam::dictionary& Foam::regionModels::regionModel::coeffs() const
|
||||||
|
{
|
||||||
|
return coeffs_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline const Foam::dictionary&
|
||||||
|
Foam::regionModels::regionModel::solution() const
|
||||||
|
{
|
||||||
|
return regionMesh().solutionDict();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline bool Foam::regionModels::regionModel::isRegionPatch
|
||||||
|
(
|
||||||
|
const label patchI
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
forAll(primaryPatchIDs_, i)
|
||||||
|
{
|
||||||
|
if (primaryPatchIDs_[i] == patchI)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline const Foam::labelList&
|
||||||
|
Foam::regionModels::regionModel::primaryPatchIDs() const
|
||||||
|
{
|
||||||
|
return primaryPatchIDs_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline const Foam::labelList&
|
||||||
|
Foam::regionModels::regionModel::intCoupledPatchIDs() const
|
||||||
|
{
|
||||||
|
return intCoupledPatchIDs_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline const Foam::PtrList<Foam::directMappedPatchBase>&
|
||||||
|
Foam::regionModels::regionModel::mappedPatches() const
|
||||||
|
{
|
||||||
|
return mappedPatches_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline Foam::label Foam::regionModels::regionModel::regionPatchID
|
||||||
|
(
|
||||||
|
const label primaryPatchID
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
forAll(primaryPatchIDs_, i)
|
||||||
|
{
|
||||||
|
if (primaryPatchIDs_[i] == primaryPatchID)
|
||||||
|
{
|
||||||
|
return intCoupledPatchIDs_[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
308
src/regionModels/regionModel/regionModel1D/regionModel1D.C
Normal file
308
src/regionModels/regionModel/regionModel1D/regionModel1D.C
Normal file
@ -0,0 +1,308 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
|
\\/ 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 2 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, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "regionModel1D.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(regionModel1D, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void Foam::regionModels::regionModel1D::constructMeshObjects()
|
||||||
|
{
|
||||||
|
const fvMesh& regionMesh = regionMeshPtr_();
|
||||||
|
|
||||||
|
nMagSfPtr_.reset
|
||||||
|
(
|
||||||
|
new surfaceScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"nMagSf",
|
||||||
|
time().timeName(),
|
||||||
|
regionMesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
regionMesh,
|
||||||
|
dimensionedScalar("zero", dimArea, 0.0)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::regionModels::regionModel1D::initialise()
|
||||||
|
{
|
||||||
|
if (debug)
|
||||||
|
{
|
||||||
|
Pout<< "regionModel1D::initialise()" << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Calculate boundaryFaceFaces and boundaryFaceCells
|
||||||
|
|
||||||
|
DynamicList<label> faceIDs;
|
||||||
|
DynamicList<label> cellIDs;
|
||||||
|
|
||||||
|
label localPyrolysisFaceI = 0;
|
||||||
|
|
||||||
|
const polyBoundaryMesh& rbm = regionMesh().boundaryMesh();
|
||||||
|
|
||||||
|
forAll(intCoupledPatchIDs_, i)
|
||||||
|
{
|
||||||
|
const label patchI = intCoupledPatchIDs_[i];
|
||||||
|
const polyPatch& ppCoupled = rbm[patchI];
|
||||||
|
forAll(ppCoupled, localFaceI)
|
||||||
|
{
|
||||||
|
label faceI = ppCoupled.start() + localFaceI;
|
||||||
|
label cellI = -1;
|
||||||
|
label nFaces = 0;
|
||||||
|
label nCells = 0;
|
||||||
|
do
|
||||||
|
{
|
||||||
|
label ownCellI = regionMesh().faceOwner()[faceI];
|
||||||
|
if (ownCellI != cellI)
|
||||||
|
{
|
||||||
|
cellI = ownCellI;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cellI = regionMesh().faceNeighbour()[faceI];
|
||||||
|
}
|
||||||
|
nCells++;
|
||||||
|
cellIDs.append(cellI);
|
||||||
|
const cell& cFaces = regionMesh().cells()[cellI];
|
||||||
|
faceI = cFaces.opposingFaceLabel(faceI, regionMesh().faces());
|
||||||
|
faceIDs.append(faceI);
|
||||||
|
nFaces++;
|
||||||
|
} while (regionMesh().isInternalFace(faceI));
|
||||||
|
|
||||||
|
boundaryFaceOppositeFace_[localPyrolysisFaceI] = faceI;
|
||||||
|
faceIDs.remove(); //remove boundary face.
|
||||||
|
nFaces--;
|
||||||
|
|
||||||
|
boundaryFaceFaces_[localPyrolysisFaceI].transfer(faceIDs);
|
||||||
|
boundaryFaceCells_[localPyrolysisFaceI].transfer(cellIDs);
|
||||||
|
|
||||||
|
localPyrolysisFaceI++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
boundaryFaceOppositeFace_.setSize(localPyrolysisFaceI);
|
||||||
|
|
||||||
|
surfaceScalarField& nMagSf = nMagSfPtr_();
|
||||||
|
|
||||||
|
forAll(intCoupledPatchIDs_, i)
|
||||||
|
{
|
||||||
|
const label patchI = intCoupledPatchIDs_[i];
|
||||||
|
const polyPatch& ppCoupled = rbm[patchI];
|
||||||
|
const vectorField& pNormals = ppCoupled.faceNormals();
|
||||||
|
nMagSf.boundaryField()[patchI] =
|
||||||
|
regionMesh().Sf().boundaryField()[patchI] & pNormals;
|
||||||
|
forAll(pNormals, localFaceI)
|
||||||
|
{
|
||||||
|
const vector& n = pNormals[localFaceI];
|
||||||
|
const labelList& faces = boundaryFaceFaces_[localFaceI];
|
||||||
|
forAll (faces, faceI)
|
||||||
|
{
|
||||||
|
const label faceID = faces[faceI];
|
||||||
|
nMagSf[faceID] = regionMesh().Sf()[faceID] & n;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
|
bool Foam::regionModels::regionModel1D::read()
|
||||||
|
{
|
||||||
|
if (regionModel::read())
|
||||||
|
{
|
||||||
|
moveMesh_.readIfPresent("moveMesh", coeffs_);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::labelField> Foam::regionModels::regionModel1D::moveMesh
|
||||||
|
(
|
||||||
|
const scalarList& deltaV,
|
||||||
|
const scalar minDelta
|
||||||
|
)
|
||||||
|
{
|
||||||
|
tmp<labelField> tcellMoveMap(new labelField(regionMesh().nCells(), 0));
|
||||||
|
labelField& cellMoveMap = tcellMoveMap();
|
||||||
|
|
||||||
|
if (!moveMesh_)
|
||||||
|
{
|
||||||
|
return cellMoveMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
pointField oldPoints = regionMesh().points();
|
||||||
|
pointField newPoints = oldPoints;
|
||||||
|
|
||||||
|
const polyBoundaryMesh& bm = regionMesh().boundaryMesh();
|
||||||
|
|
||||||
|
forAll(intCoupledPatchIDs_, localPatchI)
|
||||||
|
{
|
||||||
|
label patchI = intCoupledPatchIDs_[localPatchI];
|
||||||
|
const polyPatch pp = bm[patchI];
|
||||||
|
const vectorField& cf = regionMesh().Cf().boundaryField()[patchI];
|
||||||
|
|
||||||
|
forAll(pp, patchFaceI)
|
||||||
|
{
|
||||||
|
const labelList& faces = boundaryFaceFaces_[patchFaceI];
|
||||||
|
const labelList& cells = boundaryFaceCells_[patchFaceI];
|
||||||
|
const vector n = pp.faceNormals()[patchFaceI];
|
||||||
|
const vector sf = pp.faceAreas()[patchFaceI];
|
||||||
|
|
||||||
|
List<point> oldCf(faces.size() + 1);
|
||||||
|
oldCf[0] = cf[patchFaceI];
|
||||||
|
forAll(faces, i)
|
||||||
|
{
|
||||||
|
oldCf[i + 1] = regionMesh().faceCentres()[faces[i]];
|
||||||
|
}
|
||||||
|
|
||||||
|
vector newDelta = vector::zero;
|
||||||
|
point nbrCf = oldCf[0];
|
||||||
|
|
||||||
|
forAll(faces, i)
|
||||||
|
{
|
||||||
|
const label faceI = faces[i];
|
||||||
|
const label cellI = cells[i];
|
||||||
|
|
||||||
|
const face f = regionMesh().faces()[faceI];
|
||||||
|
|
||||||
|
newDelta += (deltaV[cellI]/mag(sf))*n;
|
||||||
|
|
||||||
|
vector localDelta = vector::zero;
|
||||||
|
forAll(f, pti)
|
||||||
|
{
|
||||||
|
const label pointI = f[pti];
|
||||||
|
|
||||||
|
if
|
||||||
|
(
|
||||||
|
((nbrCf - (oldPoints[pointI] + newDelta)) & n)
|
||||||
|
> minDelta
|
||||||
|
)
|
||||||
|
{
|
||||||
|
newPoints[pointI] = oldPoints[pointI] + newDelta;
|
||||||
|
localDelta = newDelta;
|
||||||
|
cellMoveMap[cellI] = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
nbrCf = oldCf[i + 1] + localDelta;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Modify boundary
|
||||||
|
const label bFaceI = boundaryFaceOppositeFace_[patchFaceI];
|
||||||
|
const face f = regionMesh().faces()[bFaceI];
|
||||||
|
const label cellI = cells[cells.size() - 1];
|
||||||
|
newDelta += (deltaV[cellI]/mag(sf))*n;
|
||||||
|
forAll(f, pti)
|
||||||
|
{
|
||||||
|
const label pointI = f[pti];
|
||||||
|
|
||||||
|
if
|
||||||
|
(
|
||||||
|
((nbrCf - (oldPoints[pointI] + newDelta)) & n)
|
||||||
|
> minDelta
|
||||||
|
)
|
||||||
|
{
|
||||||
|
newPoints[pointI] = oldPoints[pointI] + newDelta;
|
||||||
|
cellMoveMap[cellI] = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Move points
|
||||||
|
regionMesh().movePoints(newPoints);
|
||||||
|
|
||||||
|
return tcellMoveMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::regionModels::regionModel1D::regionModel1D(const fvMesh& mesh)
|
||||||
|
:
|
||||||
|
regionModel(mesh),
|
||||||
|
boundaryFaceFaces_(),
|
||||||
|
boundaryFaceCells_(),
|
||||||
|
boundaryFaceOppositeFace_(),
|
||||||
|
nMagSfPtr_(NULL),
|
||||||
|
moveMesh_(false)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::regionModels::regionModel1D::regionModel1D
|
||||||
|
(
|
||||||
|
const fvMesh& mesh,
|
||||||
|
const word& regionType,
|
||||||
|
const word& modelName,
|
||||||
|
bool readFields
|
||||||
|
)
|
||||||
|
:
|
||||||
|
regionModel(mesh, regionType, modelName, false),
|
||||||
|
boundaryFaceFaces_(regionMesh().nCells()),
|
||||||
|
boundaryFaceCells_(regionMesh().nCells()),
|
||||||
|
boundaryFaceOppositeFace_(regionMesh().nCells()),
|
||||||
|
nMagSfPtr_(NULL),
|
||||||
|
moveMesh_(true)
|
||||||
|
{
|
||||||
|
if (active_)
|
||||||
|
{
|
||||||
|
constructMeshObjects();
|
||||||
|
initialise();
|
||||||
|
|
||||||
|
if (readFields)
|
||||||
|
{
|
||||||
|
read();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::regionModels::regionModel1D::~regionModel1D()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
176
src/regionModels/regionModel/regionModel1D/regionModel1D.H
Normal file
176
src/regionModels/regionModel/regionModel1D/regionModel1D.H
Normal file
@ -0,0 +1,176 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
|
\\/ 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 2 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, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::regionModel1D
|
||||||
|
|
||||||
|
Description
|
||||||
|
Base class for 1-D region models
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
regionModel1D.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef regionModel1D_H
|
||||||
|
#define regionModel1D_H
|
||||||
|
|
||||||
|
#include "regionModel.H"
|
||||||
|
#include "surfaceFields.H"
|
||||||
|
#include "labelList.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class regionModel1D Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class regionModel1D
|
||||||
|
:
|
||||||
|
public regionModel
|
||||||
|
{
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Disallow default bitwise copy construct
|
||||||
|
regionModel1D(const regionModel1D&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const regionModel1D&);
|
||||||
|
|
||||||
|
//- Construct region mesh and fields
|
||||||
|
void constructMeshObjects();
|
||||||
|
|
||||||
|
//- Initialise the region
|
||||||
|
void initialise();
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
// Protected data
|
||||||
|
|
||||||
|
// Region addressing - per internally coupled patch face walking out
|
||||||
|
|
||||||
|
//- Global face IDs
|
||||||
|
labelListList boundaryFaceFaces_;
|
||||||
|
|
||||||
|
//- Global cell IDs
|
||||||
|
labelListList boundaryFaceCells_;
|
||||||
|
|
||||||
|
//- Global boundary face IDs oppossite coupled patch
|
||||||
|
labelList boundaryFaceOppositeFace_;
|
||||||
|
|
||||||
|
|
||||||
|
// Geometry
|
||||||
|
|
||||||
|
//- Face area magnitude normal to patch
|
||||||
|
autoPtr<surfaceScalarField> nMagSfPtr_;
|
||||||
|
|
||||||
|
//- Flag to allow mesh movement
|
||||||
|
Switch moveMesh_;
|
||||||
|
|
||||||
|
|
||||||
|
// Protected member functions
|
||||||
|
|
||||||
|
//- Read control parameters from dictionary
|
||||||
|
virtual bool read();
|
||||||
|
|
||||||
|
//- Move mesh points according to change in cell volumes
|
||||||
|
// Returns map ordered by cell where 1 = cell moved, 0 = cell unchanged
|
||||||
|
tmp<labelField> moveMesh
|
||||||
|
(
|
||||||
|
const scalarList& deltaV,
|
||||||
|
const scalar minDelta = 0.0
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("regionModel");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct null
|
||||||
|
regionModel1D(const fvMesh& mesh);
|
||||||
|
|
||||||
|
//- Construct from mesh, region type and name
|
||||||
|
regionModel1D
|
||||||
|
(
|
||||||
|
const fvMesh& mesh,
|
||||||
|
const word& regionType,
|
||||||
|
const word& modelName,
|
||||||
|
bool readFields = true
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~regionModel1D();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
// Access
|
||||||
|
|
||||||
|
// Addressing
|
||||||
|
|
||||||
|
//- Return the global face IDs
|
||||||
|
inline const labelListList& boundaryFaceFaces() const;
|
||||||
|
|
||||||
|
//- Return the global cell IDs
|
||||||
|
inline const labelListList& boundaryFaceCells() const;
|
||||||
|
|
||||||
|
//- Return the global boundary face IDs oppossite coupled patch
|
||||||
|
inline const labelList& boundaryFaceOppositeFace() const;
|
||||||
|
|
||||||
|
|
||||||
|
// Geometry
|
||||||
|
|
||||||
|
//- Return the face area magnitudes / [m2]
|
||||||
|
inline const surfaceScalarField& nMagSf() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#include "regionModel1DI.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
68
src/regionModels/regionModel/regionModel1D/regionModel1DI.H
Normal file
68
src/regionModels/regionModel/regionModel1D/regionModel1DI.H
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
|
\\/ 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 2 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, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "regionModel1D.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
inline const Foam::labelListList&
|
||||||
|
Foam::regionModels::regionModel1D::boundaryFaceFaces() const
|
||||||
|
{
|
||||||
|
return boundaryFaceFaces_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline const Foam::labelListList&
|
||||||
|
Foam::regionModels::regionModel1D::boundaryFaceCells() const
|
||||||
|
{
|
||||||
|
return boundaryFaceCells_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline const Foam::labelList&
|
||||||
|
Foam::regionModels::regionModel1D::boundaryFaceOppositeFace() const
|
||||||
|
{
|
||||||
|
return boundaryFaceOppositeFace_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline const Foam::surfaceScalarField&
|
||||||
|
Foam::regionModels::regionModel1D::nMagSf() const
|
||||||
|
{
|
||||||
|
if (!nMagSfPtr_.valid())
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"inline const Foam::surfaceScalarField&"
|
||||||
|
"Foam::regionModel1Ds::regionModel1D::nMagSf() const"
|
||||||
|
)<< "Face normal areas not available" << abort(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
|
return nMagSfPtr_();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,238 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
|
\\/ 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 2 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, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "singleLayerRegion.H"
|
||||||
|
#include "fvMesh.H"
|
||||||
|
#include "Time.H"
|
||||||
|
#include "directMappedWallPolyPatch.H"
|
||||||
|
#include "zeroGradientFvPatchFields.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(singleLayerRegion, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void Foam::regionModels::singleLayerRegion::constructMeshObjects()
|
||||||
|
{
|
||||||
|
// construct patch normal vectors
|
||||||
|
nHatPtr_.reset
|
||||||
|
(
|
||||||
|
new volVectorField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"nHat",
|
||||||
|
time_.timeName(),
|
||||||
|
regionMesh(),
|
||||||
|
IOobject::READ_IF_PRESENT,
|
||||||
|
NO_WRITE
|
||||||
|
),
|
||||||
|
regionMesh(),
|
||||||
|
dimensionedVector("zero", dimless, vector::zero),
|
||||||
|
zeroGradientFvPatchField<vector>::typeName
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
// construct patch areas
|
||||||
|
magSfPtr_.reset
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"magSf",
|
||||||
|
time_.timeName(),
|
||||||
|
regionMesh(),
|
||||||
|
IOobject::READ_IF_PRESENT,
|
||||||
|
NO_WRITE
|
||||||
|
),
|
||||||
|
regionMesh(),
|
||||||
|
dimensionedScalar("zero", dimArea, 0.0),
|
||||||
|
zeroGradientFvPatchField<scalar>::typeName
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::regionModels::singleLayerRegion::initialise()
|
||||||
|
{
|
||||||
|
if (debug)
|
||||||
|
{
|
||||||
|
Pout<< "singleLayerRegion::initialise()" << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
label nBoundaryFaces = 0;
|
||||||
|
const polyBoundaryMesh& rbm = regionMesh().boundaryMesh();
|
||||||
|
volVectorField& nHat = nHatPtr_();
|
||||||
|
volScalarField& magSf = magSfPtr_();
|
||||||
|
forAll(intCoupledPatchIDs_, i)
|
||||||
|
{
|
||||||
|
const label patchI = intCoupledPatchIDs_[i];
|
||||||
|
const polyPatch& pp = rbm[patchI];
|
||||||
|
const labelList& fCells = pp.faceCells();
|
||||||
|
|
||||||
|
nBoundaryFaces += fCells.size();
|
||||||
|
|
||||||
|
UIndirectList<vector>(nHat, fCells) = pp.faceNormals();
|
||||||
|
UIndirectList<scalar>(magSf, fCells) = mag(pp.faceAreas());
|
||||||
|
}
|
||||||
|
nHat.correctBoundaryConditions();
|
||||||
|
magSf.correctBoundaryConditions();
|
||||||
|
|
||||||
|
if (nBoundaryFaces != regionMesh().nCells())
|
||||||
|
{
|
||||||
|
FatalErrorIn("singleLayerRegion::initialise()")
|
||||||
|
<< "Number of primary region coupled boundary faces not equal to "
|
||||||
|
<< "the number of cells in the local region" << nl << nl
|
||||||
|
<< "Number of cells = " << regionMesh().nCells() << nl
|
||||||
|
<< "Boundary faces = " << nBoundaryFaces << nl
|
||||||
|
<< abort(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
|
scalarField passiveMagSf(magSf.size(), 0.0);
|
||||||
|
passivePatchIDs_.setSize(intCoupledPatchIDs_.size(), -1);
|
||||||
|
forAll(intCoupledPatchIDs_, i)
|
||||||
|
{
|
||||||
|
const label patchI = intCoupledPatchIDs_[i];
|
||||||
|
const polyPatch& ppIntCoupled = rbm[patchI];
|
||||||
|
if (ppIntCoupled.size() > 0)
|
||||||
|
{
|
||||||
|
label cellId = rbm[patchI].faceCells()[0];
|
||||||
|
const cell& cFaces = regionMesh().cells()[cellId];
|
||||||
|
|
||||||
|
label faceI = ppIntCoupled.start();
|
||||||
|
label faceO = cFaces.opposingFaceLabel(faceI, regionMesh().faces());
|
||||||
|
|
||||||
|
label passivePatchI = rbm.whichPatch(faceO);
|
||||||
|
passivePatchIDs_[i] = passivePatchI;
|
||||||
|
const polyPatch& ppPassive = rbm[passivePatchI];
|
||||||
|
UIndirectList<scalar>(passiveMagSf, ppPassive.faceCells()) =
|
||||||
|
mag(ppPassive.faceAreas());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Pstream::listCombineGather(passivePatchIDs_, maxEqOp<label>());
|
||||||
|
Pstream::listCombineScatter(passivePatchIDs_);
|
||||||
|
|
||||||
|
magSf.field() = 0.5*(magSf + passiveMagSf);
|
||||||
|
magSf.correctBoundaryConditions();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
|
bool Foam::regionModels::singleLayerRegion::read()
|
||||||
|
{
|
||||||
|
return regionModel::read();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::regionModels::singleLayerRegion::singleLayerRegion(const fvMesh& mesh)
|
||||||
|
:
|
||||||
|
regionModel(mesh),
|
||||||
|
nHatPtr_(NULL),
|
||||||
|
magSfPtr_(NULL),
|
||||||
|
passivePatchIDs_()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::regionModels::singleLayerRegion::singleLayerRegion
|
||||||
|
(
|
||||||
|
const fvMesh& mesh,
|
||||||
|
const word& regionType,
|
||||||
|
const word& modelName,
|
||||||
|
bool readFields
|
||||||
|
)
|
||||||
|
:
|
||||||
|
regionModel(mesh, regionType, modelName, false),
|
||||||
|
nHatPtr_(NULL),
|
||||||
|
magSfPtr_(NULL),
|
||||||
|
passivePatchIDs_()
|
||||||
|
{
|
||||||
|
if (active_)
|
||||||
|
{
|
||||||
|
constructMeshObjects();
|
||||||
|
initialise();
|
||||||
|
|
||||||
|
if (readFields)
|
||||||
|
{
|
||||||
|
read();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::regionModels::singleLayerRegion::~singleLayerRegion()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
const Foam::volVectorField& Foam::regionModels::singleLayerRegion::nHat() const
|
||||||
|
{
|
||||||
|
if (!nHatPtr_.valid())
|
||||||
|
{
|
||||||
|
FatalErrorIn("const fvMesh& singleLayerRegion::nHat() const")
|
||||||
|
<< "Region patch normal vectors not available"
|
||||||
|
<< abort(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
|
return nHatPtr_();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const Foam::volScalarField& Foam::regionModels::singleLayerRegion::magSf() const
|
||||||
|
{
|
||||||
|
if (!magSfPtr_.valid())
|
||||||
|
{
|
||||||
|
FatalErrorIn("const fvMesh& singleLayerRegion::magSf() const")
|
||||||
|
<< "Region patch areas not available"
|
||||||
|
<< abort(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
|
return magSfPtr_();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const Foam::labelList&
|
||||||
|
Foam::regionModels::singleLayerRegion::passivePatchIDs() const
|
||||||
|
{
|
||||||
|
return passivePatchIDs_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,174 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
|
\\/ 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 2 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, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::singleLayerRegion
|
||||||
|
|
||||||
|
Description
|
||||||
|
Base class for single layer region models
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
singleLayerRegion.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef singleLayerRegion_H
|
||||||
|
#define singleLayerRegion_H
|
||||||
|
|
||||||
|
#include "regionModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class singleLayerRegion Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class singleLayerRegion
|
||||||
|
:
|
||||||
|
public regionModel
|
||||||
|
{
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Disallow default bitwise copy construct
|
||||||
|
singleLayerRegion(const singleLayerRegion&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const singleLayerRegion&);
|
||||||
|
|
||||||
|
//- Construct region mesh and fields
|
||||||
|
void constructMeshObjects();
|
||||||
|
|
||||||
|
//- Initialise the region
|
||||||
|
void initialise();
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
// Protected data
|
||||||
|
|
||||||
|
// Region addressing
|
||||||
|
|
||||||
|
//- Patch normal vectors
|
||||||
|
autoPtr<volVectorField> nHatPtr_;
|
||||||
|
|
||||||
|
//- Face area magnitudes / [m2]
|
||||||
|
autoPtr<volScalarField> magSfPtr_;
|
||||||
|
|
||||||
|
|
||||||
|
// Addressing
|
||||||
|
|
||||||
|
//- List of patch IDs opposite to internally coupled patches
|
||||||
|
labelList passivePatchIDs_;
|
||||||
|
|
||||||
|
|
||||||
|
// Protected member functions
|
||||||
|
|
||||||
|
//- Read control parameters from dictionary
|
||||||
|
virtual bool read();
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("regionModel");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct null
|
||||||
|
singleLayerRegion(const fvMesh& mesh);
|
||||||
|
|
||||||
|
//- Construct from mesh, region type and name
|
||||||
|
singleLayerRegion
|
||||||
|
(
|
||||||
|
const fvMesh& mesh,
|
||||||
|
const word& regionType,
|
||||||
|
const word& modelName,
|
||||||
|
bool readFields = true
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~singleLayerRegion();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
// Access
|
||||||
|
|
||||||
|
// Region geometry
|
||||||
|
|
||||||
|
//- Return the patch normal vectors
|
||||||
|
virtual const volVectorField& nHat() const;
|
||||||
|
|
||||||
|
//- Return the face area magnitudes / [m2]
|
||||||
|
virtual const volScalarField& magSf() const;
|
||||||
|
|
||||||
|
|
||||||
|
// Addressing
|
||||||
|
|
||||||
|
//- Return the list of patch IDs opposite to internally
|
||||||
|
// coupled patches
|
||||||
|
virtual const labelList& passivePatchIDs() const;
|
||||||
|
|
||||||
|
|
||||||
|
// Patch type information
|
||||||
|
|
||||||
|
//- Return boundary types for mapped field patches
|
||||||
|
// Also maps internal field value
|
||||||
|
// Mapping region prescribed by underlying mapped poly patch
|
||||||
|
template<class Type>
|
||||||
|
wordList mappedFieldAndInternalPatchTypes() const;
|
||||||
|
|
||||||
|
//- Return boundary types for pushed mapped field patches
|
||||||
|
// Mapping region prescribed by underlying mapped poly patch
|
||||||
|
template<class Type>
|
||||||
|
wordList mappedPushedFieldPatchTypes() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#ifdef NoRepository
|
||||||
|
#include "singleLayerRegionTemplates.C"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,72 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
|
\\/ 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 2 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, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "singleLayerRegion.H"
|
||||||
|
#include "zeroGradientFvPatchFields.H"
|
||||||
|
#include "directMappedFixedInternalValueFvPatchFields.H"
|
||||||
|
#include "directMappedFixedPushedInternalValueFvPatchFields.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Foam::wordList
|
||||||
|
Foam::regionModels::singleLayerRegion::mappedFieldAndInternalPatchTypes() const
|
||||||
|
{
|
||||||
|
wordList bTypes(regionMesh().boundaryMesh().size());
|
||||||
|
|
||||||
|
bTypes = zeroGradientFvPatchField<Type>::typeName;
|
||||||
|
|
||||||
|
forAll(intCoupledPatchIDs_, i)
|
||||||
|
{
|
||||||
|
const label patchI = intCoupledPatchIDs_[i];
|
||||||
|
bTypes[patchI] =
|
||||||
|
directMappedFixedInternalValueFvPatchField<Type>::typeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
return bTypes;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Foam::wordList
|
||||||
|
Foam::regionModels::singleLayerRegion::mappedPushedFieldPatchTypes() const
|
||||||
|
{
|
||||||
|
wordList bTypes(regionMesh().boundaryMesh().size());
|
||||||
|
|
||||||
|
bTypes = zeroGradientFvPatchField<Type>::typeName;
|
||||||
|
|
||||||
|
forAll(intCoupledPatchIDs_, i)
|
||||||
|
{
|
||||||
|
const label patchI = intCoupledPatchIDs_[i];
|
||||||
|
bTypes[patchI] =
|
||||||
|
directMappedFixedPushedInternalValueFvPatchField<Type>::typeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
return bTypes;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
46
src/regionModels/surfaceFilmModels/Make/files
Normal file
46
src/regionModels/surfaceFilmModels/Make/files
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
/* Surface film models */
|
||||||
|
surfaceFilmModel/surfaceFilmModel.C
|
||||||
|
surfaceFilmModel/surfaceFilmModelNew.C
|
||||||
|
noFilm/noFilm.C
|
||||||
|
kinematicSingleLayer/kinematicSingleLayer.C
|
||||||
|
thermoSingleLayer/thermoSingleLayer.C
|
||||||
|
|
||||||
|
|
||||||
|
/* Sub-models */
|
||||||
|
submodels/subModelBase.C
|
||||||
|
|
||||||
|
KINEMATICMODELS=submodels/kinematic
|
||||||
|
$(KINEMATICMODELS)/injectionModel/injectionModel/injectionModel.C
|
||||||
|
$(KINEMATICMODELS)/injectionModel/injectionModel/injectionModelNew.C
|
||||||
|
$(KINEMATICMODELS)/injectionModel/noInjection/noInjection.C
|
||||||
|
$(KINEMATICMODELS)/injectionModel/cloudInjection/cloudInjection.C
|
||||||
|
$(KINEMATICMODELS)/injectionModel/removeInjection/removeInjection.C
|
||||||
|
|
||||||
|
THERMOMODELS=submodels/thermo
|
||||||
|
$(THERMOMODELS)/phaseChangeModel/phaseChangeModel/phaseChangeModel.C
|
||||||
|
$(THERMOMODELS)/phaseChangeModel/phaseChangeModel/phaseChangeModelNew.C
|
||||||
|
$(THERMOMODELS)/phaseChangeModel/noPhaseChange/noPhaseChange.C
|
||||||
|
$(THERMOMODELS)/phaseChangeModel/standardPhaseChange/standardPhaseChange.C
|
||||||
|
|
||||||
|
$(THERMOMODELS)/heatTransferModel/heatTransferModel/heatTransferModel.C
|
||||||
|
$(THERMOMODELS)/heatTransferModel/heatTransferModel/heatTransferModelNew.C
|
||||||
|
$(THERMOMODELS)/heatTransferModel/constantHeatTransfer/constantHeatTransfer.C
|
||||||
|
$(THERMOMODELS)/heatTransferModel/mappedConvectiveHeatTransfer/mappedConvectiveHeatTransfer.C
|
||||||
|
|
||||||
|
$(THERMOMODELS)/filmRadiationModel/filmRadiationModel/filmRadiationModel.C
|
||||||
|
$(THERMOMODELS)/filmRadiationModel/filmRadiationModel/filmRadiationModelNew.C
|
||||||
|
$(THERMOMODELS)/filmRadiationModel/noRadiation/noRadiation.C
|
||||||
|
$(THERMOMODELS)/filmRadiationModel/standardRadiation/standardRadiation.C
|
||||||
|
|
||||||
|
|
||||||
|
/* Boundary conditions */
|
||||||
|
PATCHFIELDS=derivedFvPatchFields
|
||||||
|
$(PATCHFIELDS)/filmHeightInletVelocity/filmHeightInletVelocityFvPatchVectorField.C
|
||||||
|
|
||||||
|
/* Wall functions for primary region */
|
||||||
|
WALLFUNCS=$(PATCHFIELDS)/wallFunctions
|
||||||
|
$(WALLFUNCS)/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C
|
||||||
|
$(WALLFUNCS)/mutkFilmWallFunction/mutkFilmWallFunctionFvPatchScalarField.C
|
||||||
|
|
||||||
|
|
||||||
|
LIB = $(FOAM_LIBBIN)/libsurfaceFilmModels
|
||||||
@ -12,10 +12,12 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
||||||
-I$(LIB_SRC)/turbulenceModels \
|
-I$(LIB_SRC)/turbulenceModels \
|
||||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||||
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude
|
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \
|
||||||
|
-I$(LIB_SRC)/regionModels/regionModel/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lSLGThermo \
|
-lregionModels \
|
||||||
|
-lSLGThermoNew \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-ldistributionModels \
|
-ldistributionModels \
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,7 +19,8 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -122,7 +123,7 @@ void Foam::filmHeightInletVelocityFvPatchVectorField::updateCoeffs()
|
|||||||
const fvPatchField<scalar>& deltafp =
|
const fvPatchField<scalar>& deltafp =
|
||||||
patch().lookupPatchField<volScalarField, scalar>(deltafName_);
|
patch().lookupPatchField<volScalarField, scalar>(deltafName_);
|
||||||
|
|
||||||
const vectorField n(patch().nf());
|
vectorField n = patch().nf();
|
||||||
const scalarField& magSf = patch().magSf();
|
const scalarField& magSf = patch().magSf();
|
||||||
|
|
||||||
operator==(deltafp*n*phip/(rhop*magSf*sqr(deltafp) + ROOTVSMALL));
|
operator==(deltafp*n*phip/(rhop*magSf*sqr(deltafp) + ROOTVSMALL));
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,7 +19,8 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::filmHeightInletVelocityFvPatchVectorField
|
Foam::filmHeightInletVelocityFvPatchVectorField
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,7 +19,8 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -30,6 +31,7 @@ License
|
|||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "directMappedWallPolyPatch.H"
|
#include "directMappedWallPolyPatch.H"
|
||||||
|
#include "mapDistribute.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -133,9 +135,10 @@ void alphatFilmWallFunctionFvPatchScalarField::updateCoeffs()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
typedef regionModels::surfaceFilmModels::surfaceFilmModel modelType;
|
||||||
|
|
||||||
bool ok =
|
bool ok =
|
||||||
db().objectRegistry::foundObject
|
db().objectRegistry::foundObject<modelType>("surfaceFilmProperties");
|
||||||
<surfaceFilmModels::surfaceFilmModel>("surfaceFilmProperties");
|
|
||||||
|
|
||||||
if (!ok)
|
if (!ok)
|
||||||
{
|
{
|
||||||
@ -146,27 +149,15 @@ void alphatFilmWallFunctionFvPatchScalarField::updateCoeffs()
|
|||||||
const label patchI = patch().index();
|
const label patchI = patch().index();
|
||||||
|
|
||||||
// Retrieve phase change mass from surface film model
|
// Retrieve phase change mass from surface film model
|
||||||
const surfaceFilmModels::surfaceFilmModel& filmModel =
|
const modelType& filmModel =
|
||||||
db().objectRegistry::lookupObject
|
db().objectRegistry::lookupObject<modelType>("surfaceFilmProperties");
|
||||||
<surfaceFilmModels::surfaceFilmModel>("surfaceFilmProperties");
|
|
||||||
|
|
||||||
const directMappedWallPolyPatch& wpp =
|
const label filmPatchI = filmModel.regionPatchID(patchI);
|
||||||
refCast<const directMappedWallPolyPatch>(patch().patch());
|
|
||||||
const mapDistribute& distMap = wpp.map();
|
|
||||||
label filmPatchI = -1;
|
|
||||||
forAll(filmModel.primaryPatchIDs(), i)
|
|
||||||
{
|
|
||||||
if (filmModel.primaryPatchIDs()[i] == patchI)
|
|
||||||
{
|
|
||||||
filmPatchI = filmModel.filmBottomPatchIDs()[i];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
scalarField mDotFilm
|
const mapDistribute& distMap = filmModel.mappedPatches()[filmPatchI].map();
|
||||||
(
|
|
||||||
filmModel.massPhaseChangeForPrimary().boundaryField()[filmPatchI]
|
scalarField mDotFilm =
|
||||||
);
|
filmModel.massPhaseChangeForPrimary().boundaryField()[filmPatchI];
|
||||||
distMap.distribute(mDotFilm);
|
distMap.distribute(mDotFilm);
|
||||||
|
|
||||||
// Retrieve RAS turbulence model
|
// Retrieve RAS turbulence model
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,7 +19,8 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::compressible::RASModels::alphatFilmWallFunctionFvPatchScalarField
|
Foam::compressible::RASModels::alphatFilmWallFunctionFvPatchScalarField
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -11,7 +11,7 @@ License
|
|||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
(at your (at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -23,13 +23,14 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "mutFilmWallFunctionFvPatchScalarField.H"
|
#include "mutkFilmWallFunctionFvPatchScalarField.H"
|
||||||
#include "fvPatchFieldMapper.H"
|
#include "fvPatchFieldMapper.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "RASModel.H"
|
#include "RASModel.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "surfaceFilmModel.H"
|
#include "surfaceFilmModel.H"
|
||||||
#include "directMappedWallPolyPatch.H"
|
#include "directMappedWallPolyPatch.H"
|
||||||
|
#include "mapDistribute.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -42,7 +43,7 @@ namespace RASModels
|
|||||||
|
|
||||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
tmp<scalarField> mutFilmWallFunctionFvPatchScalarField::calcUTau
|
tmp<scalarField> mutkFilmWallFunctionFvPatchScalarField::calcUTau
|
||||||
(
|
(
|
||||||
const scalarField& magGradU
|
const scalarField& magGradU
|
||||||
) const
|
) const
|
||||||
@ -50,9 +51,10 @@ tmp<scalarField> mutFilmWallFunctionFvPatchScalarField::calcUTau
|
|||||||
tmp<scalarField> tuTau(new scalarField(patch().size(), 0.0));
|
tmp<scalarField> tuTau(new scalarField(patch().size(), 0.0));
|
||||||
scalarField& uTau = tuTau();
|
scalarField& uTau = tuTau();
|
||||||
|
|
||||||
|
typedef regionModels::surfaceFilmModels::surfaceFilmModel modelType;
|
||||||
|
|
||||||
bool ok =
|
bool ok =
|
||||||
db().objectRegistry::foundObject
|
db().objectRegistry::foundObject<modelType>("surfaceFilmProperties");
|
||||||
<surfaceFilmModels::surfaceFilmModel>("surfaceFilmProperties");
|
|
||||||
|
|
||||||
if (!ok)
|
if (!ok)
|
||||||
{
|
{
|
||||||
@ -63,27 +65,15 @@ tmp<scalarField> mutFilmWallFunctionFvPatchScalarField::calcUTau
|
|||||||
const label patchI = patch().index();
|
const label patchI = patch().index();
|
||||||
|
|
||||||
// Retrieve phase change mass from surface film model
|
// Retrieve phase change mass from surface film model
|
||||||
const surfaceFilmModels::surfaceFilmModel& filmModel =
|
const modelType& filmModel =
|
||||||
db().objectRegistry::lookupObject
|
db().objectRegistry::lookupObject<modelType>("surfaceFilmProperties");
|
||||||
<surfaceFilmModels::surfaceFilmModel>("surfaceFilmProperties");
|
|
||||||
|
|
||||||
const directMappedWallPolyPatch& wpp =
|
const label filmPatchI = filmModel.regionPatchID(patchI);
|
||||||
refCast<const directMappedWallPolyPatch>(patch().patch());
|
|
||||||
const mapDistribute& distMap = wpp.map();
|
|
||||||
label filmPatchI = -1;
|
|
||||||
forAll(filmModel.primaryPatchIDs(), i)
|
|
||||||
{
|
|
||||||
if (filmModel.primaryPatchIDs()[i] == patchI)
|
|
||||||
{
|
|
||||||
filmPatchI = filmModel.filmBottomPatchIDs()[i];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
scalarField mDotFilm
|
const mapDistribute& distMap = filmModel.mappedPatches()[filmPatchI].map();
|
||||||
(
|
|
||||||
filmModel.massPhaseChangeForPrimary().boundaryField()[filmPatchI]
|
scalarField mDotFilm =
|
||||||
);
|
filmModel.massPhaseChangeForPrimary().boundaryField()[filmPatchI];
|
||||||
distMap.distribute(mDotFilm);
|
distMap.distribute(mDotFilm);
|
||||||
|
|
||||||
|
|
||||||
@ -127,13 +117,13 @@ tmp<scalarField> mutFilmWallFunctionFvPatchScalarField::calcUTau
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
tmp<scalarField> mutFilmWallFunctionFvPatchScalarField::calcMut() const
|
tmp<scalarField> mutkFilmWallFunctionFvPatchScalarField::calcMut() const
|
||||||
{
|
{
|
||||||
const label patchI = patch().index();
|
const label patchI = patch().index();
|
||||||
|
|
||||||
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
||||||
const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI];
|
const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI];
|
||||||
const scalarField magGradU(mag(Uw.snGrad()));
|
const scalarField magGradU = mag(Uw.snGrad());
|
||||||
const scalarField& rhow = rasModel.rho().boundaryField()[patchI];
|
const scalarField& rhow = rasModel.rho().boundaryField()[patchI];
|
||||||
const scalarField& muw = rasModel.mu().boundaryField()[patchI];
|
const scalarField& muw = rasModel.mu().boundaryField()[patchI];
|
||||||
|
|
||||||
@ -147,7 +137,7 @@ tmp<scalarField> mutFilmWallFunctionFvPatchScalarField::calcMut() const
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
mutFilmWallFunctionFvPatchScalarField::mutFilmWallFunctionFvPatchScalarField
|
mutkFilmWallFunctionFvPatchScalarField::mutkFilmWallFunctionFvPatchScalarField
|
||||||
(
|
(
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
const DimensionedField<scalar, volMesh>& iF
|
const DimensionedField<scalar, volMesh>& iF
|
||||||
@ -159,9 +149,9 @@ mutFilmWallFunctionFvPatchScalarField::mutFilmWallFunctionFvPatchScalarField
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
mutFilmWallFunctionFvPatchScalarField::mutFilmWallFunctionFvPatchScalarField
|
mutkFilmWallFunctionFvPatchScalarField::mutkFilmWallFunctionFvPatchScalarField
|
||||||
(
|
(
|
||||||
const mutFilmWallFunctionFvPatchScalarField& ptf,
|
const mutkFilmWallFunctionFvPatchScalarField& ptf,
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
const DimensionedField<scalar, volMesh>& iF,
|
const DimensionedField<scalar, volMesh>& iF,
|
||||||
const fvPatchFieldMapper& mapper
|
const fvPatchFieldMapper& mapper
|
||||||
@ -173,7 +163,7 @@ mutFilmWallFunctionFvPatchScalarField::mutFilmWallFunctionFvPatchScalarField
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
mutFilmWallFunctionFvPatchScalarField::mutFilmWallFunctionFvPatchScalarField
|
mutkFilmWallFunctionFvPatchScalarField::mutkFilmWallFunctionFvPatchScalarField
|
||||||
(
|
(
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
const DimensionedField<scalar, volMesh>& iF,
|
const DimensionedField<scalar, volMesh>& iF,
|
||||||
@ -186,9 +176,9 @@ mutFilmWallFunctionFvPatchScalarField::mutFilmWallFunctionFvPatchScalarField
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
mutFilmWallFunctionFvPatchScalarField::mutFilmWallFunctionFvPatchScalarField
|
mutkFilmWallFunctionFvPatchScalarField::mutkFilmWallFunctionFvPatchScalarField
|
||||||
(
|
(
|
||||||
const mutFilmWallFunctionFvPatchScalarField& wfpsf
|
const mutkFilmWallFunctionFvPatchScalarField& wfpsf
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
mutkWallFunctionFvPatchScalarField(wfpsf),
|
mutkWallFunctionFvPatchScalarField(wfpsf),
|
||||||
@ -197,9 +187,9 @@ mutFilmWallFunctionFvPatchScalarField::mutFilmWallFunctionFvPatchScalarField
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
mutFilmWallFunctionFvPatchScalarField::mutFilmWallFunctionFvPatchScalarField
|
mutkFilmWallFunctionFvPatchScalarField::mutkFilmWallFunctionFvPatchScalarField
|
||||||
(
|
(
|
||||||
const mutFilmWallFunctionFvPatchScalarField& wfpsf,
|
const mutkFilmWallFunctionFvPatchScalarField& wfpsf,
|
||||||
const DimensionedField<scalar, volMesh>& iF
|
const DimensionedField<scalar, volMesh>& iF
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
@ -211,7 +201,7 @@ mutFilmWallFunctionFvPatchScalarField::mutFilmWallFunctionFvPatchScalarField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
tmp<scalarField> mutFilmWallFunctionFvPatchScalarField::yPlus() const
|
tmp<scalarField> mutkFilmWallFunctionFvPatchScalarField::yPlus() const
|
||||||
{
|
{
|
||||||
const label patchI = patch().index();
|
const label patchI = patch().index();
|
||||||
|
|
||||||
@ -225,7 +215,7 @@ tmp<scalarField> mutFilmWallFunctionFvPatchScalarField::yPlus() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void mutFilmWallFunctionFvPatchScalarField::write(Ostream& os) const
|
void mutkFilmWallFunctionFvPatchScalarField::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
fvPatchField<scalar>::write(os);
|
fvPatchField<scalar>::write(os);
|
||||||
writeLocalEntries(os);
|
writeLocalEntries(os);
|
||||||
@ -237,11 +227,7 @@ void mutFilmWallFunctionFvPatchScalarField::write(Ostream& os) const
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
makePatchTypeField
|
makePatchTypeField(fvPatchScalarField, mutkFilmWallFunctionFvPatchScalarField);
|
||||||
(
|
|
||||||
fvPatchScalarField,
|
|
||||||
mutFilmWallFunctionFvPatchScalarField
|
|
||||||
);
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -11,7 +11,7 @@ License
|
|||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
(at your (at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -23,13 +23,13 @@ License
|
|||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::compressible::RASModels::
|
Foam::compressible::RASModels::
|
||||||
mutFilmWallFunctionFvPatchScalarField
|
mutkFilmWallFunctionFvPatchScalarField
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Wall function boundary condition for use with surface film models.
|
Wall function boundary condition for use with surface film models.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
mutFilmWallFunctionFvPatchScalarField.C
|
mutkFilmWallFunctionFvPatchScalarField.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -48,10 +48,10 @@ namespace RASModels
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class mutFilmWallFunctionFvPatchScalarField Declaration
|
Class mutkFilmWallFunctionFvPatchScalarField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class mutFilmWallFunctionFvPatchScalarField
|
class mutkFilmWallFunctionFvPatchScalarField
|
||||||
:
|
:
|
||||||
public mutkWallFunctionFvPatchScalarField
|
public mutkWallFunctionFvPatchScalarField
|
||||||
{
|
{
|
||||||
@ -78,20 +78,20 @@ protected:
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("mutFilmWallFunction");
|
TypeName("mutkFilmWallFunction");
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from patch and internal field
|
//- Construct from patch and internal field
|
||||||
mutFilmWallFunctionFvPatchScalarField
|
mutkFilmWallFunctionFvPatchScalarField
|
||||||
(
|
(
|
||||||
const fvPatch&,
|
const fvPatch&,
|
||||||
const DimensionedField<scalar, volMesh>&
|
const DimensionedField<scalar, volMesh>&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from patch, internal field and dictionary
|
//- Construct from patch, internal field and dictionary
|
||||||
mutFilmWallFunctionFvPatchScalarField
|
mutkFilmWallFunctionFvPatchScalarField
|
||||||
(
|
(
|
||||||
const fvPatch&,
|
const fvPatch&,
|
||||||
const DimensionedField<scalar, volMesh>&,
|
const DimensionedField<scalar, volMesh>&,
|
||||||
@ -99,20 +99,20 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct by mapping given
|
//- Construct by mapping given
|
||||||
// mutFilmWallFunctionFvPatchScalarField
|
// mutkFilmWallFunctionFvPatchScalarField
|
||||||
// onto a new patch
|
// onto a new patch
|
||||||
mutFilmWallFunctionFvPatchScalarField
|
mutkFilmWallFunctionFvPatchScalarField
|
||||||
(
|
(
|
||||||
const mutFilmWallFunctionFvPatchScalarField&,
|
const mutkFilmWallFunctionFvPatchScalarField&,
|
||||||
const fvPatch&,
|
const fvPatch&,
|
||||||
const DimensionedField<scalar, volMesh>&,
|
const DimensionedField<scalar, volMesh>&,
|
||||||
const fvPatchFieldMapper&
|
const fvPatchFieldMapper&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct as copy
|
//- Construct as copy
|
||||||
mutFilmWallFunctionFvPatchScalarField
|
mutkFilmWallFunctionFvPatchScalarField
|
||||||
(
|
(
|
||||||
const mutFilmWallFunctionFvPatchScalarField&
|
const mutkFilmWallFunctionFvPatchScalarField&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone
|
//- Construct and return a clone
|
||||||
@ -120,14 +120,14 @@ public:
|
|||||||
{
|
{
|
||||||
return tmp<fvPatchScalarField>
|
return tmp<fvPatchScalarField>
|
||||||
(
|
(
|
||||||
new mutFilmWallFunctionFvPatchScalarField(*this)
|
new mutkFilmWallFunctionFvPatchScalarField(*this)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Construct as copy setting internal field reference
|
//- Construct as copy setting internal field reference
|
||||||
mutFilmWallFunctionFvPatchScalarField
|
mutkFilmWallFunctionFvPatchScalarField
|
||||||
(
|
(
|
||||||
const mutFilmWallFunctionFvPatchScalarField&,
|
const mutkFilmWallFunctionFvPatchScalarField&,
|
||||||
const DimensionedField<scalar, volMesh>&
|
const DimensionedField<scalar, volMesh>&
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -139,7 +139,7 @@ public:
|
|||||||
{
|
{
|
||||||
return tmp<fvPatchScalarField>
|
return tmp<fvPatchScalarField>
|
||||||
(
|
(
|
||||||
new mutFilmWallFunctionFvPatchScalarField(*this, iF)
|
new mutkFilmWallFunctionFvPatchScalarField(*this, iF)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,7 +19,8 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::kinematicSingleLayer
|
Foam::kinematicSingleLayer
|
||||||
@ -45,6 +46,8 @@ SourceFiles
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
namespace surfaceFilmModels
|
namespace surfaceFilmModels
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -74,29 +77,6 @@ protected:
|
|||||||
|
|
||||||
// Protected data
|
// Protected data
|
||||||
|
|
||||||
// Mesh databases
|
|
||||||
|
|
||||||
//- Film region mesh database
|
|
||||||
fvMesh filmRegion_;
|
|
||||||
|
|
||||||
//- Patch normal vectors
|
|
||||||
volVectorField nHat_;
|
|
||||||
|
|
||||||
//- Face area magnitudes / [m2]
|
|
||||||
volScalarField magSf_;
|
|
||||||
|
|
||||||
//- List of patch IDs on the primary region coupled with the film
|
|
||||||
// region
|
|
||||||
labelList primaryPatchIDs_;
|
|
||||||
|
|
||||||
//- List of patch IDs on oppositte side of the film region
|
|
||||||
labelList filmTopPatchIDs_;
|
|
||||||
|
|
||||||
//- List of patch IDs on the film region coupled with the primary
|
|
||||||
// region
|
|
||||||
labelList filmBottomPatchIDs_;
|
|
||||||
|
|
||||||
|
|
||||||
// Solution parameters
|
// Solution parameters
|
||||||
|
|
||||||
//- Momentum predictor
|
//- Momentum predictor
|
||||||
@ -120,14 +100,14 @@ protected:
|
|||||||
//- Skin frition coefficient for film/primary region interface
|
//- Skin frition coefficient for film/primary region interface
|
||||||
scalar Cf_;
|
scalar Cf_;
|
||||||
|
|
||||||
|
//- Stable film thickness
|
||||||
|
dimensionedScalar deltaStable_;
|
||||||
|
|
||||||
|
|
||||||
// Thermo properties
|
// Thermo properties
|
||||||
|
|
||||||
// Fields
|
// Fields
|
||||||
|
|
||||||
//- Initiliased thermo flag
|
|
||||||
bool initialisedThermo_;
|
|
||||||
|
|
||||||
//- Density / [kg/m3]
|
//- Density / [kg/m3]
|
||||||
volScalarField rho_;
|
volScalarField rho_;
|
||||||
|
|
||||||
@ -225,14 +205,17 @@ protected:
|
|||||||
// Checks
|
// Checks
|
||||||
|
|
||||||
//- Cumulative mass added via sources [kg]
|
//- Cumulative mass added via sources [kg]
|
||||||
scalar addedMass_;
|
scalar addedMassTotal_;
|
||||||
|
|
||||||
|
|
||||||
|
// Detached surface properties
|
||||||
|
|
||||||
|
//- Cumulative mass detached [kg]
|
||||||
|
scalar injectedMassTotal_;
|
||||||
|
|
||||||
|
|
||||||
// Protected member functions
|
// Protected member functions
|
||||||
|
|
||||||
//- Initialise the film model - called on construction
|
|
||||||
void initialise();
|
|
||||||
|
|
||||||
//- Read control parameters from dictionary
|
//- Read control parameters from dictionary
|
||||||
virtual bool read();
|
virtual bool read();
|
||||||
|
|
||||||
@ -242,8 +225,14 @@ protected:
|
|||||||
//- Reset source term fields
|
//- Reset source term fields
|
||||||
virtual void resetPrimaryRegionSourceTerms();
|
virtual void resetPrimaryRegionSourceTerms();
|
||||||
|
|
||||||
//- Transfer fields from the primary region to the film region
|
//- Transfer thermo fields from the primary region to the film region
|
||||||
virtual void transferPrimaryRegionFields();
|
virtual void transferPrimaryRegionThermoFields();
|
||||||
|
|
||||||
|
//- Transfer source fields from the primary region to the film region
|
||||||
|
virtual void transferPrimaryRegionSourceFields();
|
||||||
|
|
||||||
|
//- Correct the source terms for film that detaches from film region
|
||||||
|
virtual void correctDetachedFilm();
|
||||||
|
|
||||||
// Explicit pressure source contribution
|
// Explicit pressure source contribution
|
||||||
virtual tmp<volScalarField> pu();
|
virtual tmp<volScalarField> pu();
|
||||||
@ -254,9 +243,6 @@ protected:
|
|||||||
//- Update the film sub-models
|
//- Update the film sub-models
|
||||||
virtual void updateSubmodels();
|
virtual void updateSubmodels();
|
||||||
|
|
||||||
//- Courant number evaluation
|
|
||||||
virtual scalar CourantNumber() const;
|
|
||||||
|
|
||||||
//- Continuity check
|
//- Continuity check
|
||||||
virtual void continuityCheck();
|
virtual void continuityCheck();
|
||||||
|
|
||||||
@ -310,7 +296,8 @@ public:
|
|||||||
(
|
(
|
||||||
const word& modelType,
|
const word& modelType,
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
const dimensionedVector& g
|
const dimensionedVector& g,
|
||||||
|
const bool readFields = true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -320,31 +307,10 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
// Access
|
|
||||||
|
|
||||||
//- Return the film mesh database
|
|
||||||
virtual const fvMesh& film() const;
|
|
||||||
|
|
||||||
//- Return the patch normal vectors
|
|
||||||
inline const volVectorField& nHat() const;
|
|
||||||
|
|
||||||
//- Return the face area magnitudes / [m2]
|
|
||||||
inline const volScalarField& magSf() const;
|
|
||||||
|
|
||||||
//- Return the list of coupled patches on the film region
|
|
||||||
virtual const labelList& filmBottomPatchIDs() const;
|
|
||||||
|
|
||||||
//- Return the list of patches oppositte coupled patches
|
|
||||||
virtual const labelList& filmTopPatchIDs() const;
|
|
||||||
|
|
||||||
//- Return the list of coupled patches on the primary region
|
|
||||||
virtual const labelList& primaryPatchIDs() const;
|
|
||||||
|
|
||||||
|
|
||||||
// Solution parameters
|
// Solution parameters
|
||||||
|
|
||||||
//- Return the film region solution dictionary
|
//- Courant number evaluation
|
||||||
inline const dictionary& solution() const;
|
virtual scalar CourantNumber() const;
|
||||||
|
|
||||||
//- Return the momentum predictor
|
//- Return the momentum predictor
|
||||||
inline const Switch& momentumPredictor() const;
|
inline const Switch& momentumPredictor() const;
|
||||||
@ -421,10 +387,6 @@ public:
|
|||||||
|
|
||||||
// External helper functions
|
// External helper functions
|
||||||
|
|
||||||
//- Return true if patchI on the primary region is a coupled patch
|
|
||||||
// to the film region
|
|
||||||
virtual bool isFilmPatch(const label patchI) const;
|
|
||||||
|
|
||||||
//- External hook to add sources to the film
|
//- External hook to add sources to the film
|
||||||
virtual void addSources
|
virtual void addSources
|
||||||
(
|
(
|
||||||
@ -509,10 +471,10 @@ public:
|
|||||||
// Evolution
|
// Evolution
|
||||||
|
|
||||||
//- Pre-evolve film hook
|
//- Pre-evolve film hook
|
||||||
virtual void preEvolveFilm();
|
virtual void preEvolveRegion();
|
||||||
|
|
||||||
//- Evolve the film equations
|
//- Evolve the film equations
|
||||||
virtual void evolveFilm();
|
virtual void evolveRegion();
|
||||||
|
|
||||||
|
|
||||||
// Source fields
|
// Source fields
|
||||||
@ -542,6 +504,7 @@ public:
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace surfaceFilmModels
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -0,0 +1,250 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
|
\\/ 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 2 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, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "kinematicSingleLayer.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
namespace surfaceFilmModels
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
inline const Switch& kinematicSingleLayer::momentumPredictor() const
|
||||||
|
{
|
||||||
|
return momentumPredictor_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline label kinematicSingleLayer::nOuterCorr() const
|
||||||
|
{
|
||||||
|
return nOuterCorr_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline label kinematicSingleLayer::nCorr() const
|
||||||
|
{
|
||||||
|
return nCorr_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline label kinematicSingleLayer::nNonOrthCorr() const
|
||||||
|
{
|
||||||
|
return nNonOrthCorr_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline scalar kinematicSingleLayer::Cf() const
|
||||||
|
{
|
||||||
|
return Cf_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline const volScalarField& kinematicSingleLayer::mu() const
|
||||||
|
{
|
||||||
|
return mu_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline const volScalarField& kinematicSingleLayer::sigma() const
|
||||||
|
{
|
||||||
|
return sigma_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline const volScalarField& kinematicSingleLayer::delta() const
|
||||||
|
{
|
||||||
|
return delta_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline volVectorField& kinematicSingleLayer::USpPrimary()
|
||||||
|
{
|
||||||
|
return USpPrimary_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline volScalarField& kinematicSingleLayer::pSpPrimary()
|
||||||
|
{
|
||||||
|
return pSpPrimary_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline volScalarField& kinematicSingleLayer::rhoSpPrimary()
|
||||||
|
{
|
||||||
|
return rhoSpPrimary_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline volVectorField& kinematicSingleLayer::USp()
|
||||||
|
{
|
||||||
|
return USp_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline volScalarField& kinematicSingleLayer::pSp()
|
||||||
|
{
|
||||||
|
return pSp_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline volScalarField& kinematicSingleLayer::rhoSp()
|
||||||
|
{
|
||||||
|
return rhoSp_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline const volVectorField& kinematicSingleLayer::USp() const
|
||||||
|
{
|
||||||
|
return USp_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline const volScalarField& kinematicSingleLayer::pSp() const
|
||||||
|
{
|
||||||
|
return pSp_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline const volScalarField& kinematicSingleLayer::rhoSp() const
|
||||||
|
{
|
||||||
|
return rhoSp_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline const volVectorField& kinematicSingleLayer::UPrimary() const
|
||||||
|
{
|
||||||
|
return UPrimary_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline const volScalarField& kinematicSingleLayer::pPrimary() const
|
||||||
|
{
|
||||||
|
return pPrimary_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline const volScalarField& kinematicSingleLayer::rhoPrimary() const
|
||||||
|
{
|
||||||
|
return rhoPrimary_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline const volScalarField& kinematicSingleLayer::muPrimary() const
|
||||||
|
{
|
||||||
|
return muPrimary_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline injectionModel& kinematicSingleLayer::injection()
|
||||||
|
{
|
||||||
|
return injection_();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline tmp<volScalarField> kinematicSingleLayer::gNorm() const
|
||||||
|
{
|
||||||
|
tmp<volScalarField> tgNorm
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"gNorm",
|
||||||
|
time().timeName(),
|
||||||
|
regionMesh(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
g_ & nHat(),
|
||||||
|
zeroGradientFvPatchScalarField::typeName
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
return tgNorm;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline tmp<volScalarField> kinematicSingleLayer::gNormClipped() const
|
||||||
|
{
|
||||||
|
tmp<volScalarField> tgNormClipped
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"gNormClipped",
|
||||||
|
time().timeName(),
|
||||||
|
regionMesh(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
g_ & nHat(),
|
||||||
|
zeroGradientFvPatchScalarField::typeName
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
volScalarField& gNormClipped = tgNormClipped();
|
||||||
|
gNormClipped.min(0.0);
|
||||||
|
|
||||||
|
return tgNormClipped;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline tmp<volVectorField> kinematicSingleLayer::gTan() const
|
||||||
|
{
|
||||||
|
tmp<volVectorField> tgTan
|
||||||
|
(
|
||||||
|
new volVectorField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"gTan",
|
||||||
|
time().timeName(),
|
||||||
|
regionMesh(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
g_ - nHat()*gNorm(),
|
||||||
|
zeroGradientFvPatchVectorField::typeName
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
return tgTan;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,24 +19,34 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "kinematicSingleLayer.H"
|
#include "kinematicSingleLayer.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
namespace surfaceFilmModels
|
||||||
|
{
|
||||||
|
|
||||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::surfaceFilmModels::kinematicSingleLayer::constrainFilmField
|
void kinematicSingleLayer::constrainFilmField
|
||||||
(
|
(
|
||||||
Type& field,
|
Type& field,
|
||||||
const typename Type::cmptType& value
|
const typename Type::cmptType& value
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
forAll(filmBottomPatchIDs_, i)
|
forAll(intCoupledPatchIDs_, i)
|
||||||
{
|
{
|
||||||
label patchI = filmBottomPatchIDs_[i];
|
label patchI = intCoupledPatchIDs_[i];
|
||||||
field.boundaryField()[patchI] = value;
|
field.boundaryField()[patchI] = value;
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
@ -45,9 +55,9 @@ void Foam::surfaceFilmModels::kinematicSingleLayer::constrainFilmField
|
|||||||
<< " to " << value << endl;
|
<< " to " << value << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
forAll(filmTopPatchIDs_, i)
|
forAll(passivePatchIDs_, i)
|
||||||
{
|
{
|
||||||
label patchI = filmTopPatchIDs_[i];
|
label patchI = passivePatchIDs_[i];
|
||||||
field.boundaryField()[patchI] = value;
|
field.boundaryField()[patchI] = value;
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
@ -59,4 +69,10 @@ void Foam::surfaceFilmModels::kinematicSingleLayer::constrainFilmField
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // end namespace Foam
|
||||||
|
} // end namespace regionModels
|
||||||
|
} // end namespace surfaceFilmModels
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,7 +19,8 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -27,21 +28,24 @@ License
|
|||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
namespace surfaceFilmModels
|
namespace regionModels
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(noFilm, 0);
|
namespace surfaceFilmModels
|
||||||
addToRunTimeSelectionTable(surfaceFilmModel, noFilm, mesh);
|
{
|
||||||
}
|
|
||||||
}
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
defineTypeNameAndDebug(noFilm, 0);
|
||||||
|
addToRunTimeSelectionTable(surfaceFilmModel, noFilm, mesh);
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
bool Foam::surfaceFilmModels::noFilm::read()
|
bool noFilm::read()
|
||||||
{
|
{
|
||||||
if (surfaceFilmModel::read())
|
if (surfaceFilmModel::read())
|
||||||
{
|
{
|
||||||
@ -57,72 +61,26 @@ bool Foam::surfaceFilmModels::noFilm::read()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::surfaceFilmModels::noFilm::noFilm
|
noFilm::noFilm
|
||||||
(
|
(
|
||||||
const word& modelType,
|
const word&,
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
const dimensionedVector& g
|
const dimensionedVector&
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
surfaceFilmModel(modelType, mesh, g)
|
surfaceFilmModel(mesh)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::surfaceFilmModels::noFilm::~noFilm()
|
noFilm::~noFilm()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::surfaceFilmModels::noFilm::preEvolveFilm()
|
void noFilm::addSources
|
||||||
{
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::surfaceFilmModels::noFilm::evolveFilm()
|
|
||||||
{
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const Foam::fvMesh& Foam::surfaceFilmModels::noFilm::film() const
|
|
||||||
{
|
|
||||||
FatalErrorIn("const fvMesh& noFilm::film() const")
|
|
||||||
<< "Cannot return film for noFilm model" << abort(FatalError);
|
|
||||||
|
|
||||||
return mesh();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const Foam::labelList&
|
|
||||||
Foam::surfaceFilmModels::noFilm::filmBottomPatchIDs() const
|
|
||||||
{
|
|
||||||
return labelList::null();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const Foam::labelList& Foam::surfaceFilmModels::noFilm::filmTopPatchIDs() const
|
|
||||||
{
|
|
||||||
return labelList::null();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const Foam::labelList& Foam::surfaceFilmModels::noFilm::primaryPatchIDs() const
|
|
||||||
{
|
|
||||||
return labelList::null();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool Foam::surfaceFilmModels::noFilm::isFilmPatch(const label) const
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::surfaceFilmModels::noFilm::addSources
|
|
||||||
(
|
(
|
||||||
const label,
|
const label,
|
||||||
const label,
|
const label,
|
||||||
@ -136,7 +94,7 @@ void Foam::surfaceFilmModels::noFilm::addSources
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const Foam::volScalarField& Foam::surfaceFilmModels::noFilm::delta() const
|
const volScalarField& noFilm::delta() const
|
||||||
{
|
{
|
||||||
FatalErrorIn("const volScalarField& noFilm::delta() const")
|
FatalErrorIn("const volScalarField& noFilm::delta() const")
|
||||||
<< "delta field not available for " << type() << abort(FatalError);
|
<< "delta field not available for " << type() << abort(FatalError);
|
||||||
@ -144,7 +102,8 @@ const Foam::volScalarField& Foam::surfaceFilmModels::noFilm::delta() const
|
|||||||
return volScalarField::null();
|
return volScalarField::null();
|
||||||
}
|
}
|
||||||
|
|
||||||
const Foam::volVectorField& Foam::surfaceFilmModels::noFilm::U() const
|
|
||||||
|
const volVectorField& noFilm::U() const
|
||||||
{
|
{
|
||||||
FatalErrorIn("const volVectorField& noFilm::U() const")
|
FatalErrorIn("const volVectorField& noFilm::U() const")
|
||||||
<< "U field not available for " << type() << abort(FatalError);
|
<< "U field not available for " << type() << abort(FatalError);
|
||||||
@ -153,7 +112,7 @@ const Foam::volVectorField& Foam::surfaceFilmModels::noFilm::U() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const Foam::volVectorField& Foam::surfaceFilmModels::noFilm::Us() const
|
const volVectorField& noFilm::Us() const
|
||||||
{
|
{
|
||||||
FatalErrorIn("const volVectorField& noFilm::Us() const")
|
FatalErrorIn("const volVectorField& noFilm::Us() const")
|
||||||
<< "Us field not available for " << type() << abort(FatalError);
|
<< "Us field not available for " << type() << abort(FatalError);
|
||||||
@ -162,7 +121,7 @@ const Foam::volVectorField& Foam::surfaceFilmModels::noFilm::Us() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const Foam::volVectorField& Foam::surfaceFilmModels::noFilm::Uw() const
|
const volVectorField& noFilm::Uw() const
|
||||||
{
|
{
|
||||||
FatalErrorIn("const volVectorField& noFilm::Uw() const")
|
FatalErrorIn("const volVectorField& noFilm::Uw() const")
|
||||||
<< "Uw field not available for " << type() << abort(FatalError);
|
<< "Uw field not available for " << type() << abort(FatalError);
|
||||||
@ -171,7 +130,7 @@ const Foam::volVectorField& Foam::surfaceFilmModels::noFilm::Uw() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const Foam::volScalarField& Foam::surfaceFilmModels::noFilm::rho() const
|
const volScalarField& noFilm::rho() const
|
||||||
{
|
{
|
||||||
FatalErrorIn("const volScalarField& noFilm::rho() const")
|
FatalErrorIn("const volScalarField& noFilm::rho() const")
|
||||||
<< "rho field not available for " << type() << abort(FatalError);
|
<< "rho field not available for " << type() << abort(FatalError);
|
||||||
@ -180,34 +139,34 @@ const Foam::volScalarField& Foam::surfaceFilmModels::noFilm::rho() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const Foam::volScalarField& Foam::surfaceFilmModels::noFilm::T() const
|
const volScalarField& noFilm::T() const
|
||||||
{
|
{
|
||||||
FatalErrorIn("const Foam::volScalarField& Foam::noFilm::T() const")
|
FatalErrorIn("const volScalarField& noFilm::T() const")
|
||||||
<< "T field not available for " << type() << abort(FatalError);
|
<< "T field not available for " << type() << abort(FatalError);
|
||||||
|
|
||||||
return volScalarField::null();
|
return volScalarField::null();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const Foam::volScalarField& Foam::surfaceFilmModels::noFilm::Ts() const
|
const volScalarField& noFilm::Ts() const
|
||||||
{
|
{
|
||||||
FatalErrorIn("const Foam::volScalarField& Foam::noFilm::Ts() const")
|
FatalErrorIn("const volScalarField& noFilm::Ts() const")
|
||||||
<< "Ts field not available for " << type() << abort(FatalError);
|
<< "Ts field not available for " << type() << abort(FatalError);
|
||||||
|
|
||||||
return volScalarField::null();
|
return volScalarField::null();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const Foam::volScalarField& Foam::surfaceFilmModels::noFilm::Tw() const
|
const volScalarField& noFilm::Tw() const
|
||||||
{
|
{
|
||||||
FatalErrorIn("const Foam::volScalarField& Foam::noFilm::Tw() const")
|
FatalErrorIn("const volScalarField& noFilm::Tw() const")
|
||||||
<< "Tw field not available for " << type() << abort(FatalError);
|
<< "Tw field not available for " << type() << abort(FatalError);
|
||||||
|
|
||||||
return volScalarField::null();
|
return volScalarField::null();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const Foam::volScalarField& Foam::surfaceFilmModels::noFilm::Cp() const
|
const volScalarField& noFilm::Cp() const
|
||||||
{
|
{
|
||||||
FatalErrorIn("const volScalarField& noFilm::Cp() const")
|
FatalErrorIn("const volScalarField& noFilm::Cp() const")
|
||||||
<< "Cp field not available for " << type() << abort(FatalError);
|
<< "Cp field not available for " << type() << abort(FatalError);
|
||||||
@ -216,7 +175,7 @@ const Foam::volScalarField& Foam::surfaceFilmModels::noFilm::Cp() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const Foam::volScalarField& Foam::surfaceFilmModels::noFilm::kappa() const
|
const volScalarField& noFilm::kappa() const
|
||||||
{
|
{
|
||||||
FatalErrorIn("const volScalarField& noFilm::kappa() const")
|
FatalErrorIn("const volScalarField& noFilm::kappa() const")
|
||||||
<< "kappa field not available for " << type() << abort(FatalError);
|
<< "kappa field not available for " << type() << abort(FatalError);
|
||||||
@ -225,8 +184,7 @@ const Foam::volScalarField& Foam::surfaceFilmModels::noFilm::kappa() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const Foam::volScalarField&
|
const volScalarField& noFilm::massForPrimary() const
|
||||||
Foam::surfaceFilmModels::noFilm::massForPrimary() const
|
|
||||||
{
|
{
|
||||||
FatalErrorIn("const volScalarField& noFilm::massForPrimary() const")
|
FatalErrorIn("const volScalarField& noFilm::massForPrimary() const")
|
||||||
<< "massForPrimary field not available for " << type()
|
<< "massForPrimary field not available for " << type()
|
||||||
@ -236,8 +194,7 @@ Foam::surfaceFilmModels::noFilm::massForPrimary() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const Foam::volScalarField&
|
const volScalarField& noFilm::diametersForPrimary() const
|
||||||
Foam::surfaceFilmModels::noFilm::diametersForPrimary() const
|
|
||||||
{
|
{
|
||||||
FatalErrorIn("const volScalarField& noFilm::diametersForPrimary() const")
|
FatalErrorIn("const volScalarField& noFilm::diametersForPrimary() const")
|
||||||
<< "diametersForPrimary field not available for " << type()
|
<< "diametersForPrimary field not available for " << type()
|
||||||
@ -247,8 +204,7 @@ Foam::surfaceFilmModels::noFilm::diametersForPrimary() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const Foam::volScalarField&
|
const volScalarField& noFilm::massPhaseChangeForPrimary() const
|
||||||
Foam::surfaceFilmModels::noFilm::massPhaseChangeForPrimary() const
|
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
@ -260,8 +216,7 @@ Foam::surfaceFilmModels::noFilm::massPhaseChangeForPrimary() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
|
tmp<DimensionedField<scalar, volMesh> > noFilm::Srho() const
|
||||||
Foam::surfaceFilmModels::noFilm::Srho() const
|
|
||||||
{
|
{
|
||||||
return tmp<DimensionedField<scalar, volMesh> >
|
return tmp<DimensionedField<scalar, volMesh> >
|
||||||
(
|
(
|
||||||
@ -270,21 +225,20 @@ Foam::surfaceFilmModels::noFilm::Srho() const
|
|||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"noFilm::Srho",
|
"noFilm::Srho",
|
||||||
time_.timeName(),
|
time().timeName(),
|
||||||
mesh_,
|
primaryMesh(),
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::NO_WRITE,
|
IOobject::NO_WRITE,
|
||||||
false
|
false
|
||||||
),
|
),
|
||||||
mesh_,
|
primaryMesh(),
|
||||||
dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0)
|
dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
|
tmp<DimensionedField<scalar, volMesh> > noFilm::Srho(const label) const
|
||||||
Foam::surfaceFilmModels::noFilm::Srho(const label) const
|
|
||||||
{
|
{
|
||||||
return tmp<DimensionedField<scalar, volMesh> >
|
return tmp<DimensionedField<scalar, volMesh> >
|
||||||
(
|
(
|
||||||
@ -292,22 +246,21 @@ Foam::surfaceFilmModels::noFilm::Srho(const label) const
|
|||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"kinematicSingleLayer::Srho(i)",
|
"noFilm::Srho(i)",
|
||||||
time_.timeName(),
|
time().timeName(),
|
||||||
mesh_,
|
primaryMesh(),
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::NO_WRITE,
|
IOobject::NO_WRITE,
|
||||||
false
|
false
|
||||||
),
|
),
|
||||||
mesh_,
|
primaryMesh(),
|
||||||
dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0)
|
dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
|
tmp<DimensionedField<scalar, volMesh> > noFilm::Sh() const
|
||||||
Foam::surfaceFilmModels::noFilm::Sh() const
|
|
||||||
{
|
{
|
||||||
return tmp<DimensionedField<scalar, volMesh> >
|
return tmp<DimensionedField<scalar, volMesh> >
|
||||||
(
|
(
|
||||||
@ -315,24 +268,24 @@ Foam::surfaceFilmModels::noFilm::Sh() const
|
|||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"kinematicSingleLayer::Sh",
|
"noFilm::Sh",
|
||||||
time_.timeName(),
|
time().timeName(),
|
||||||
mesh_,
|
primaryMesh(),
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::NO_WRITE,
|
IOobject::NO_WRITE,
|
||||||
false
|
false
|
||||||
),
|
),
|
||||||
mesh_,
|
primaryMesh(),
|
||||||
dimensionedScalar("zero", dimEnergy/dimVolume/dimTime, 0.0)
|
dimensionedScalar("zero", dimEnergy/dimVolume/dimTime, 0.0)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::surfaceFilmModels::noFilm::info() const
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
{
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,7 +19,8 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::noFilm
|
Foam::noFilm
|
||||||
@ -36,12 +37,13 @@ SourceFiles
|
|||||||
#define noFilm_H
|
#define noFilm_H
|
||||||
|
|
||||||
#include "surfaceFilmModel.H"
|
#include "surfaceFilmModel.H"
|
||||||
#include "volFieldsFwd.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
namespace surfaceFilmModels
|
namespace surfaceFilmModels
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -97,21 +99,6 @@ public:
|
|||||||
|
|
||||||
// Access
|
// Access
|
||||||
|
|
||||||
//- Return the film mesh database
|
|
||||||
virtual const fvMesh& film() const;
|
|
||||||
|
|
||||||
//- Return the list of coupled patches on the film region
|
|
||||||
virtual const labelList& filmBottomPatchIDs() const;
|
|
||||||
|
|
||||||
//- Return the list of patches oppositte coupled patches
|
|
||||||
virtual const labelList& filmTopPatchIDs() const;
|
|
||||||
|
|
||||||
//- Return the list of coupled patches on the primary region
|
|
||||||
virtual const labelList& primaryPatchIDs() const;
|
|
||||||
|
|
||||||
//- Return true if patchI is a coupled patch to the film region
|
|
||||||
virtual bool isFilmPatch(const label patchI) const;
|
|
||||||
|
|
||||||
//- External hook to add sources to the film
|
//- External hook to add sources to the film
|
||||||
virtual void addSources
|
virtual void addSources
|
||||||
(
|
(
|
||||||
@ -169,15 +156,6 @@ public:
|
|||||||
virtual const volScalarField& massPhaseChangeForPrimary() const;
|
virtual const volScalarField& massPhaseChangeForPrimary() const;
|
||||||
|
|
||||||
|
|
||||||
// Evolution
|
|
||||||
|
|
||||||
//- Pre-evolve film hook
|
|
||||||
virtual void preEvolveFilm();
|
|
||||||
|
|
||||||
//- Evolve the film equations
|
|
||||||
virtual void evolveFilm();
|
|
||||||
|
|
||||||
|
|
||||||
// Source fields
|
// Source fields
|
||||||
|
|
||||||
// Mapped into primary region
|
// Mapped into primary region
|
||||||
@ -193,18 +171,13 @@ public:
|
|||||||
|
|
||||||
//- Return enthalpy source - Eulerian phase only
|
//- Return enthalpy source - Eulerian phase only
|
||||||
virtual tmp<DimensionedField<scalar, volMesh> > Sh() const;
|
virtual tmp<DimensionedField<scalar, volMesh> > Sh() const;
|
||||||
|
|
||||||
|
|
||||||
// I-O
|
|
||||||
|
|
||||||
//- Provide some feedback
|
|
||||||
virtual void info() const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace surfaceFilmModels
|
} // End namespace surfaceFilmModels
|
||||||
|
} // regionModels
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -8,10 +8,10 @@
|
|||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,7 +19,8 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -28,23 +29,26 @@ License
|
|||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathematicalConstants.H"
|
||||||
|
#include "Random.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
namespace surfaceFilmModels
|
namespace regionModels
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(cloudInjection, 0);
|
namespace surfaceFilmModels
|
||||||
addToRunTimeSelectionTable(injectionModel, cloudInjection, dictionary);
|
{
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
defineTypeNameAndDebug(cloudInjection, 0);
|
||||||
|
addToRunTimeSelectionTable(injectionModel, cloudInjection, dictionary);
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::surfaceFilmModels::cloudInjection::cloudInjection
|
cloudInjection::cloudInjection
|
||||||
(
|
(
|
||||||
const surfaceFilmModel& owner,
|
const surfaceFilmModel& owner,
|
||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
@ -61,7 +65,7 @@ Foam::surfaceFilmModels::cloudInjection::cloudInjection
|
|||||||
rndGen_
|
rndGen_
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
diameter_(owner.film().nCells(), 0.0)
|
diameter_(owner.regionMesh().nCells(), 0.0)
|
||||||
{
|
{
|
||||||
forAll(diameter_, faceI)
|
forAll(diameter_, faceI)
|
||||||
{
|
{
|
||||||
@ -72,20 +76,18 @@ Foam::surfaceFilmModels::cloudInjection::cloudInjection
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::surfaceFilmModels::cloudInjection::~cloudInjection()
|
cloudInjection::~cloudInjection()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::surfaceFilmModels::cloudInjection::inject
|
void cloudInjection::correct
|
||||||
(
|
(
|
||||||
scalarField& massToInject,
|
scalarField& massToInject,
|
||||||
scalarField& diameterToInject
|
scalarField& diameterToInject
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
correctDetachedFilm(massToInject);
|
|
||||||
|
|
||||||
const scalar pi = constant::mathematical::pi;
|
const scalar pi = constant::mathematical::pi;
|
||||||
const scalarField& rhoFilm = owner().rho();
|
const scalarField& rhoFilm = owner().rho();
|
||||||
|
|
||||||
@ -114,4 +116,10 @@ void Foam::surfaceFilmModels::cloudInjection::inject
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -8,10 +8,10 @@
|
|||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,7 +19,8 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::cloudInjection
|
Foam::cloudInjection
|
||||||
@ -43,6 +44,8 @@ SourceFiles
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
namespace surfaceFilmModels
|
namespace surfaceFilmModels
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -103,8 +106,8 @@ public:
|
|||||||
|
|
||||||
// Evolution
|
// Evolution
|
||||||
|
|
||||||
//- Inject
|
//- Correct
|
||||||
virtual void inject
|
virtual void correct
|
||||||
(
|
(
|
||||||
scalarField& massToInject,
|
scalarField& massToInject,
|
||||||
scalarField& diameterToInject
|
scalarField& diameterToInject
|
||||||
@ -115,6 +118,7 @@ public:
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace surfaceFilmModels
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -0,0 +1,74 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
|
\\/ 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 2 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, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "injectionModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
namespace surfaceFilmModels
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
defineTypeNameAndDebug(injectionModel, 0);
|
||||||
|
defineRunTimeSelectionTable(injectionModel, dictionary);
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
injectionModel::injectionModel(const surfaceFilmModel& owner)
|
||||||
|
:
|
||||||
|
subModelBase(owner)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
injectionModel::injectionModel
|
||||||
|
(
|
||||||
|
const word& type,
|
||||||
|
const surfaceFilmModel& owner,
|
||||||
|
const dictionary& dict
|
||||||
|
)
|
||||||
|
:
|
||||||
|
subModelBase(type, owner, dict)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
injectionModel::~injectionModel()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,32 +19,25 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::injectionModel
|
Foam::injectionModel
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Injection model class for use with surface film modelling
|
Base class for film injection models
|
||||||
|
|
||||||
Sets the newly injected fluid properties by manipulating two arrays:
|
|
||||||
|
|
||||||
- massToInject
|
|
||||||
- diameterToInject
|
|
||||||
|
|
||||||
This mass is later subtracted from the film
|
|
||||||
|
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
injectionModelI.H
|
|
||||||
injectionModel.C
|
injectionModel.C
|
||||||
|
injectionModelNew.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef injectionModel_H
|
#ifndef injectionModel_H
|
||||||
#define injectionModel_H
|
#define injectionModel_H
|
||||||
|
|
||||||
#include "surfaceFilmModel.H"
|
#include "subModelBase.H"
|
||||||
#include "runTimeSelectionTables.H"
|
#include "runTimeSelectionTables.H"
|
||||||
#include "scalarField.H"
|
#include "scalarField.H"
|
||||||
|
|
||||||
@ -52,6 +45,8 @@ SourceFiles
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
namespace surfaceFilmModels
|
namespace surfaceFilmModels
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -60,6 +55,8 @@ namespace surfaceFilmModels
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class injectionModel
|
class injectionModel
|
||||||
|
:
|
||||||
|
public subModelBase
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@ -72,29 +69,6 @@ private:
|
|||||||
void operator=(const injectionModel&);
|
void operator=(const injectionModel&);
|
||||||
|
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
// Protected data
|
|
||||||
|
|
||||||
//- Reference to the owner surface film model
|
|
||||||
const surfaceFilmModel& owner_;
|
|
||||||
|
|
||||||
//- Model coefficients dictionary
|
|
||||||
dictionary coeffs_;
|
|
||||||
|
|
||||||
//- Cumulative injected mass
|
|
||||||
scalar injectedMass_;
|
|
||||||
|
|
||||||
//- Stable film thickness - film cannot detach until reached
|
|
||||||
scalar deltaStable_;
|
|
||||||
|
|
||||||
|
|
||||||
// Protected Member Functions
|
|
||||||
|
|
||||||
//- Correct film detached mass
|
|
||||||
void correctDetachedFilm(scalarField& mass) const;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
@ -131,7 +105,7 @@ public:
|
|||||||
|
|
||||||
// Selectors
|
// Selectors
|
||||||
|
|
||||||
//- Return a reference to the selected phase change model
|
//- Return a reference to the selected injection model
|
||||||
static autoPtr<injectionModel> New
|
static autoPtr<injectionModel> New
|
||||||
(
|
(
|
||||||
const surfaceFilmModel& owner,
|
const surfaceFilmModel& owner,
|
||||||
@ -145,53 +119,25 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
// Access
|
|
||||||
|
|
||||||
//- Return the reference to the owner surface film model
|
|
||||||
inline const surfaceFilmModel& owner() const;
|
|
||||||
|
|
||||||
//- Return the model coefficients dictionary
|
|
||||||
inline const dictionary& coeffs() const;
|
|
||||||
|
|
||||||
//- Return access to the injected mass [kg]
|
|
||||||
inline scalar injectedMass() const;
|
|
||||||
|
|
||||||
|
|
||||||
// Evolution
|
// Evolution
|
||||||
|
|
||||||
//- Correct - wrapper around inject(...)
|
//- Correct
|
||||||
virtual void correct
|
virtual void correct
|
||||||
(
|
|
||||||
volScalarField& massToInject,
|
|
||||||
volScalarField& diameterToInject
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Inject
|
|
||||||
virtual void inject
|
|
||||||
(
|
(
|
||||||
scalarField& massToInject,
|
scalarField& massToInject,
|
||||||
scalarField& diameterToInject
|
scalarField& diameterToInject
|
||||||
) = 0;
|
) = 0;
|
||||||
|
|
||||||
|
|
||||||
// Input/output
|
|
||||||
|
|
||||||
//- Output model statistics
|
|
||||||
virtual void info() const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace surfaceFilmModels
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "injectionModelI.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,16 +19,25 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "injectionModel.H"
|
#include "injectionModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
namespace surfaceFilmModels
|
||||||
|
{
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::autoPtr<Foam::surfaceFilmModels::injectionModel>
|
autoPtr<injectionModel> injectionModel::New
|
||||||
Foam::surfaceFilmModels::injectionModel::New
|
|
||||||
(
|
(
|
||||||
const surfaceFilmModel& model,
|
const surfaceFilmModel& model,
|
||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
@ -48,7 +57,7 @@ Foam::surfaceFilmModels::injectionModel::New
|
|||||||
"injectionModel::New(const surfaceFilmModel&, const dictionary&)"
|
"injectionModel::New(const surfaceFilmModel&, const dictionary&)"
|
||||||
) << "Unknown injectionModel type " << modelType
|
) << "Unknown injectionModel type " << modelType
|
||||||
<< nl << nl << "Valid injectionModel types are:" << nl
|
<< nl << nl << "Valid injectionModel types are:" << nl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->toc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,4 +65,10 @@ Foam::surfaceFilmModels::injectionModel::New
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,28 +19,31 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "noInjection.H"
|
#include "noInjection.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
namespace surfaceFilmModels
|
namespace regionModels
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(noInjection, 0);
|
namespace surfaceFilmModels
|
||||||
addToRunTimeSelectionTable(injectionModel, noInjection, dictionary);
|
{
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
defineTypeNameAndDebug(noInjection, 0);
|
||||||
|
addToRunTimeSelectionTable(injectionModel, noInjection, dictionary);
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::surfaceFilmModels::noInjection::noInjection
|
noInjection::noInjection
|
||||||
(
|
(
|
||||||
const surfaceFilmModel& owner,
|
const surfaceFilmModel& owner,
|
||||||
const dictionary&
|
const dictionary&
|
||||||
@ -52,13 +55,13 @@ Foam::surfaceFilmModels::noInjection::noInjection
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::surfaceFilmModels::noInjection::~noInjection()
|
noInjection::~noInjection()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::surfaceFilmModels::noInjection::inject
|
void noInjection::correct
|
||||||
(
|
(
|
||||||
scalarField& massToInject,
|
scalarField& massToInject,
|
||||||
scalarField& diameterToInject
|
scalarField& diameterToInject
|
||||||
@ -66,8 +69,13 @@ void Foam::surfaceFilmModels::noInjection::inject
|
|||||||
{
|
{
|
||||||
// no mass injected
|
// no mass injected
|
||||||
massToInject = 0.0;
|
massToInject = 0.0;
|
||||||
diameterToInject = -1.0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,7 +19,8 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::noInjection
|
Foam::noInjection
|
||||||
@ -41,6 +42,8 @@ SourceFiles
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
namespace surfaceFilmModels
|
namespace surfaceFilmModels
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -83,8 +86,8 @@ public:
|
|||||||
|
|
||||||
// Evolution
|
// Evolution
|
||||||
|
|
||||||
//- Inject
|
//- Correct
|
||||||
virtual void inject
|
virtual void correct
|
||||||
(
|
(
|
||||||
scalarField& massToInject,
|
scalarField& massToInject,
|
||||||
scalarField& diameterToInject
|
scalarField& diameterToInject
|
||||||
@ -95,6 +98,7 @@ public:
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace surfaceFilmModels
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,28 +19,31 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "removeInjection.H"
|
#include "removeInjection.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
namespace surfaceFilmModels
|
namespace regionModels
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(removeInjection, 0);
|
namespace surfaceFilmModels
|
||||||
addToRunTimeSelectionTable(injectionModel, removeInjection, dictionary);
|
{
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
defineTypeNameAndDebug(removeInjection, 0);
|
||||||
|
addToRunTimeSelectionTable(injectionModel, removeInjection, dictionary);
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::surfaceFilmModels::removeInjection::removeInjection
|
removeInjection::removeInjection
|
||||||
(
|
(
|
||||||
const surfaceFilmModel& owner,
|
const surfaceFilmModel& owner,
|
||||||
const dictionary&
|
const dictionary&
|
||||||
@ -52,22 +55,26 @@ Foam::surfaceFilmModels::removeInjection::removeInjection
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::surfaceFilmModels::removeInjection::~removeInjection()
|
removeInjection::~removeInjection()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::surfaceFilmModels::removeInjection::inject
|
void removeInjection::correct
|
||||||
(
|
(
|
||||||
scalarField& massToInject,
|
scalarField&,
|
||||||
scalarField& diameterToInject
|
scalarField&
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// all mass available to be removed
|
// do nothing - all mass available to be removed
|
||||||
correctDetachedFilm(massToInject);
|
|
||||||
diameterToInject = -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,7 +19,8 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::removeInjection
|
Foam::removeInjection
|
||||||
@ -41,6 +42,8 @@ SourceFiles
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
namespace surfaceFilmModels
|
namespace surfaceFilmModels
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -83,8 +86,8 @@ public:
|
|||||||
|
|
||||||
// Evolution
|
// Evolution
|
||||||
|
|
||||||
//- Inject
|
//- Correct
|
||||||
virtual void inject
|
virtual void correct
|
||||||
(
|
(
|
||||||
scalarField& massToInject,
|
scalarField& massToInject,
|
||||||
scalarField& diameterToInject
|
scalarField& diameterToInject
|
||||||
@ -95,6 +98,7 @@ public:
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace surfaceFilmModels
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,37 +19,32 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "phaseChangeModel.H"
|
#include "subModelBase.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
namespace surfaceFilmModels
|
namespace regionModels
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(phaseChangeModel, 0);
|
namespace surfaceFilmModels
|
||||||
defineRunTimeSelectionTable(phaseChangeModel, dictionary);
|
{
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::surfaceFilmModels::phaseChangeModel::phaseChangeModel
|
subModelBase::subModelBase(const surfaceFilmModel& owner)
|
||||||
(
|
|
||||||
const surfaceFilmModel& owner
|
|
||||||
)
|
|
||||||
:
|
:
|
||||||
owner_(owner),
|
owner_(owner),
|
||||||
coeffs_(dictionary::null)
|
coeffs_(dictionary::null)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
Foam::surfaceFilmModels::phaseChangeModel::phaseChangeModel
|
subModelBase::subModelBase
|
||||||
(
|
(
|
||||||
const word& type,
|
const word& type,
|
||||||
const surfaceFilmModel& owner,
|
const surfaceFilmModel& owner,
|
||||||
@ -63,8 +58,14 @@ Foam::surfaceFilmModels::phaseChangeModel::phaseChangeModel
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::surfaceFilmModels::phaseChangeModel::~phaseChangeModel()
|
subModelBase::~subModelBase()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
125
src/regionModels/surfaceFilmModels/submodels/subModelBase.H
Normal file
125
src/regionModels/surfaceFilmModels/submodels/subModelBase.H
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
|
\\/ 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 2 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, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::subModelBase
|
||||||
|
|
||||||
|
Description
|
||||||
|
Base class for surface film sub-models
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
subModelBaseI.H
|
||||||
|
subModelBase.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef subModelBase_H
|
||||||
|
#define subModelBase_H
|
||||||
|
|
||||||
|
#include "surfaceFilmModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
namespace surfaceFilmModels
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class subModelBase Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class subModelBase
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Disallow default bitwise copy construct
|
||||||
|
subModelBase(const subModelBase&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const subModelBase&);
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
// Protected data
|
||||||
|
|
||||||
|
//- Reference to the owner surface film model
|
||||||
|
const surfaceFilmModel& owner_;
|
||||||
|
|
||||||
|
//- Model coefficients dictionary
|
||||||
|
dictionary coeffs_;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct null
|
||||||
|
subModelBase(const surfaceFilmModel& owner);
|
||||||
|
|
||||||
|
//- Construct from type name, dictionary and surface film model
|
||||||
|
subModelBase
|
||||||
|
(
|
||||||
|
const word& type,
|
||||||
|
const surfaceFilmModel& owner,
|
||||||
|
const dictionary& dict
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~subModelBase();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
// Access
|
||||||
|
|
||||||
|
//- Return the reference to the owner surface film model
|
||||||
|
inline const surfaceFilmModel& owner() const;
|
||||||
|
|
||||||
|
//- Return the model coefficients dictionary
|
||||||
|
inline const dictionary& coeffs() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#include "subModelBaseI.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,26 +19,40 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "phaseChangeModel.H"
|
#include "subModelBase.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
inline const Foam::surfaceFilmModels::surfaceFilmModel&
|
namespace Foam
|
||||||
Foam::surfaceFilmModels::phaseChangeModel::owner() const
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
namespace surfaceFilmModels
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
inline const surfaceFilmModel& subModelBase::owner() const
|
||||||
{
|
{
|
||||||
return owner_;
|
return owner_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline const Foam::dictionary&
|
inline const dictionary& subModelBase::coeffs() const
|
||||||
Foam::surfaceFilmModels::phaseChangeModel::coeffs() const
|
|
||||||
{
|
{
|
||||||
return coeffs_;
|
return coeffs_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,77 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
|
\\/ 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 2 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, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "filmRadiationModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
namespace surfaceFilmModels
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
defineTypeNameAndDebug(filmRadiationModel, 0);
|
||||||
|
defineRunTimeSelectionTable(filmRadiationModel, dictionary);
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
filmRadiationModel::filmRadiationModel
|
||||||
|
(
|
||||||
|
const surfaceFilmModel& owner
|
||||||
|
)
|
||||||
|
:
|
||||||
|
subModelBase(owner)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
filmRadiationModel::filmRadiationModel
|
||||||
|
(
|
||||||
|
const word& type,
|
||||||
|
const surfaceFilmModel& owner,
|
||||||
|
const dictionary& dict
|
||||||
|
)
|
||||||
|
:
|
||||||
|
subModelBase(type, owner, dict)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
filmRadiationModel::~filmRadiationModel()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,141 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
|
\\/ 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 2 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, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::filmRadiationModel
|
||||||
|
|
||||||
|
Description
|
||||||
|
Base class for film radiation models
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
filmRadiationModel.C
|
||||||
|
filmRadiationModelNew.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef filmRadiationModel_H
|
||||||
|
#define filmRadiationModel_H
|
||||||
|
|
||||||
|
#include "subModelBase.H"
|
||||||
|
#include "runTimeSelectionTables.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
namespace surfaceFilmModels
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class filmRadiationModel Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class filmRadiationModel
|
||||||
|
:
|
||||||
|
public subModelBase
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Disallow default bitwise copy construct
|
||||||
|
filmRadiationModel(const filmRadiationModel&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const filmRadiationModel&);
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("radiationModel");
|
||||||
|
|
||||||
|
|
||||||
|
// Declare runtime constructor selection table
|
||||||
|
|
||||||
|
declareRunTimeSelectionTable
|
||||||
|
(
|
||||||
|
autoPtr,
|
||||||
|
filmRadiationModel,
|
||||||
|
dictionary,
|
||||||
|
(
|
||||||
|
const surfaceFilmModel& owner,
|
||||||
|
const dictionary& dict
|
||||||
|
),
|
||||||
|
(owner, dict)
|
||||||
|
);
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct null
|
||||||
|
filmRadiationModel(const surfaceFilmModel& owner);
|
||||||
|
|
||||||
|
//- Construct from type name, dictionary and surface film model
|
||||||
|
filmRadiationModel
|
||||||
|
(
|
||||||
|
const word& type,
|
||||||
|
const surfaceFilmModel& owner,
|
||||||
|
const dictionary& dict
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Selectors
|
||||||
|
|
||||||
|
//- Return a reference to the selected phase change model
|
||||||
|
static autoPtr<filmRadiationModel> New
|
||||||
|
(
|
||||||
|
const surfaceFilmModel& owner,
|
||||||
|
const dictionary& dict
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~filmRadiationModel();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
// Evolution
|
||||||
|
|
||||||
|
//- Correct
|
||||||
|
virtual void correct() = 0;
|
||||||
|
|
||||||
|
//- Return the radiation sensible enthalpy source
|
||||||
|
virtual tmp<volScalarField> Shs() = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,78 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
|
\\/ 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 2 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, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "filmRadiationModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
namespace surfaceFilmModels
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
autoPtr<filmRadiationModel> filmRadiationModel::New
|
||||||
|
(
|
||||||
|
const surfaceFilmModel& model,
|
||||||
|
const dictionary& dict
|
||||||
|
)
|
||||||
|
{
|
||||||
|
word modelType(dict.lookup("radiationModel"));
|
||||||
|
|
||||||
|
Info<< " Selecting radiationModel " << modelType << endl;
|
||||||
|
|
||||||
|
dictionaryConstructorTable::iterator cstrIter =
|
||||||
|
dictionaryConstructorTablePtr_->find(modelType);
|
||||||
|
|
||||||
|
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"filmRadiationModel::New"
|
||||||
|
"("
|
||||||
|
"const surfaceFilmModel&, "
|
||||||
|
"const dictionary&"
|
||||||
|
")"
|
||||||
|
) << "Unknown radiationModel type " << modelType << nl << nl
|
||||||
|
<< "Valid filmRadiationModel types are:" << nl
|
||||||
|
<< dictionaryConstructorTablePtr_->toc()
|
||||||
|
<< exit(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
|
return autoPtr<filmRadiationModel>(cstrIter()(model, dict));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,106 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
|
\\/ 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 2 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, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "noRadiation.H"
|
||||||
|
#include "volFields.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
#include "zeroGradientFvPatchFields.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
namespace surfaceFilmModels
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
defineTypeNameAndDebug(noRadiation, 0);
|
||||||
|
|
||||||
|
addToRunTimeSelectionTable
|
||||||
|
(
|
||||||
|
filmRadiationModel,
|
||||||
|
noRadiation,
|
||||||
|
dictionary
|
||||||
|
);
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
noRadiation::noRadiation
|
||||||
|
(
|
||||||
|
const surfaceFilmModel& owner,
|
||||||
|
const dictionary& dict
|
||||||
|
)
|
||||||
|
:
|
||||||
|
filmRadiationModel(owner)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
noRadiation::~noRadiation()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void noRadiation::correct()
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
tmp<volScalarField> noRadiation::Shs()
|
||||||
|
{
|
||||||
|
return tmp<volScalarField>
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
typeName + "::Shs",
|
||||||
|
owner().time().timeName(),
|
||||||
|
owner().regionMesh(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
owner().regionMesh(),
|
||||||
|
dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0),
|
||||||
|
zeroGradientFvPatchScalarField::typeName
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,112 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
|
\\/ 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 2 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, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::noRadiation
|
||||||
|
|
||||||
|
Description
|
||||||
|
Dummy radiation model for 'none' option
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
noRadiation.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef noRadiation_H
|
||||||
|
#define noRadiation_H
|
||||||
|
|
||||||
|
#include "filmRadiationModel.H"
|
||||||
|
#include "volFieldsFwd.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
namespace surfaceFilmModels
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class noRadiation Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class noRadiation
|
||||||
|
:
|
||||||
|
public filmRadiationModel
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
|
||||||
|
// Private member functions
|
||||||
|
|
||||||
|
//- Disallow default bitwise copy construct
|
||||||
|
noRadiation(const noRadiation&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const noRadiation&);
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("none");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from surface film model and dictionary
|
||||||
|
noRadiation
|
||||||
|
(
|
||||||
|
const surfaceFilmModel& owner,
|
||||||
|
const dictionary& dict
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~noRadiation();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
// Evolution
|
||||||
|
|
||||||
|
//- Correct
|
||||||
|
virtual void correct();
|
||||||
|
|
||||||
|
//- Return the radiation sensible enthalpy source
|
||||||
|
virtual tmp<volScalarField> Shs();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,151 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
|
\\/ 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 2 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, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "standardRadiation.H"
|
||||||
|
#include "volFields.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
#include "zeroGradientFvPatchFields.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
namespace surfaceFilmModels
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
defineTypeNameAndDebug(standardRadiation, 0);
|
||||||
|
|
||||||
|
addToRunTimeSelectionTable
|
||||||
|
(
|
||||||
|
filmRadiationModel,
|
||||||
|
standardRadiation,
|
||||||
|
dictionary
|
||||||
|
);
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
standardRadiation::standardRadiation
|
||||||
|
(
|
||||||
|
const surfaceFilmModel& owner,
|
||||||
|
const dictionary& dict
|
||||||
|
)
|
||||||
|
:
|
||||||
|
filmRadiationModel(typeName, owner, dict),
|
||||||
|
QrPrimary_
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"Qr", // same name as Qr on primary region to enable mapping
|
||||||
|
owner.time().timeName(),
|
||||||
|
owner.regionMesh(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
owner.regionMesh(),
|
||||||
|
dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0),
|
||||||
|
owner.mappedPushedFieldPatchTypes<scalar>()
|
||||||
|
),
|
||||||
|
QrNet_
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"QrNet",
|
||||||
|
owner.time().timeName(),
|
||||||
|
owner.regionMesh(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
owner.regionMesh(),
|
||||||
|
dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0),
|
||||||
|
zeroGradientFvPatchScalarField::typeName
|
||||||
|
),
|
||||||
|
delta_(owner.delta()),
|
||||||
|
deltaMin_(readScalar(coeffs_.lookup("deltaMin"))),
|
||||||
|
beta_(readScalar(coeffs_.lookup("beta"))),
|
||||||
|
kappaBar_(readScalar(coeffs_.lookup("kappaBar")))
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
standardRadiation::~standardRadiation()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void standardRadiation::correct()
|
||||||
|
{
|
||||||
|
// Transfer Qr from primary region
|
||||||
|
QrPrimary_.correctBoundaryConditions();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
tmp<volScalarField> standardRadiation::Shs()
|
||||||
|
{
|
||||||
|
tmp<volScalarField> tShs
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
typeName + "::Shs",
|
||||||
|
owner().time().timeName(),
|
||||||
|
owner().regionMesh(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
owner().regionMesh(),
|
||||||
|
dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0),
|
||||||
|
zeroGradientFvPatchScalarField::typeName
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
scalarField& Shs = tShs();
|
||||||
|
const scalarField& QrP = QrPrimary_.internalField();
|
||||||
|
const scalarField& delta = delta_.internalField();
|
||||||
|
|
||||||
|
Shs = beta_*(QrP*pos(delta - deltaMin_))*(1.0 - exp(-kappaBar_*delta));
|
||||||
|
|
||||||
|
// Update net Qr on local region
|
||||||
|
QrNet_.internalField() = QrP - Shs;
|
||||||
|
QrNet_.correctBoundaryConditions();
|
||||||
|
|
||||||
|
return tShs;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,137 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
|
\\/ 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 2 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, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::standardRadiation
|
||||||
|
|
||||||
|
Description
|
||||||
|
Standard radiation model
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
standardRadiation.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef standardRadiation_H
|
||||||
|
#define standardRadiation_H
|
||||||
|
|
||||||
|
#include "filmRadiationModel.H"
|
||||||
|
#include "volFieldsFwd.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
namespace surfaceFilmModels
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class standardRadiation Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class standardRadiation
|
||||||
|
:
|
||||||
|
public filmRadiationModel
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
//- Radiative flux mapped from the primary region / [kg/s3]
|
||||||
|
volScalarField QrPrimary_;
|
||||||
|
|
||||||
|
//- Remaining radiative flux after removing local contribution
|
||||||
|
volScalarField QrNet_;
|
||||||
|
|
||||||
|
//- Reference to the film thickness field / [m]
|
||||||
|
const volScalarField& delta_;
|
||||||
|
|
||||||
|
|
||||||
|
// Model coefficients
|
||||||
|
|
||||||
|
//- Minimum thickness to apply radiation model
|
||||||
|
scalar deltaMin_;
|
||||||
|
|
||||||
|
//- Beta coefficient
|
||||||
|
scalar beta_;
|
||||||
|
|
||||||
|
//- Bar(kappa) coefficient
|
||||||
|
scalar kappaBar_;
|
||||||
|
|
||||||
|
|
||||||
|
// Private member functions
|
||||||
|
|
||||||
|
//- Disallow default bitwise copy construct
|
||||||
|
standardRadiation(const standardRadiation&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const standardRadiation&);
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("standardRadiation");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from surface film model and dictionary
|
||||||
|
standardRadiation
|
||||||
|
(
|
||||||
|
const surfaceFilmModel& owner,
|
||||||
|
const dictionary& dict
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~standardRadiation();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
// Evolution
|
||||||
|
|
||||||
|
//- Correct
|
||||||
|
virtual void correct();
|
||||||
|
|
||||||
|
//- Return the radiation sensible enthalpy source
|
||||||
|
// Also updates QrNet
|
||||||
|
virtual tmp<volScalarField> Shs();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,7 +19,8 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -28,26 +29,29 @@ License
|
|||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "zeroGradientFvPatchFields.H"
|
#include "zeroGradientFvPatchFields.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
namespace surfaceFilmModels
|
namespace regionModels
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(constantHeatTransfer, 0);
|
namespace surfaceFilmModels
|
||||||
addToRunTimeSelectionTable
|
{
|
||||||
(
|
|
||||||
heatTransferModel,
|
|
||||||
constantHeatTransfer,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
defineTypeNameAndDebug(constantHeatTransfer, 0);
|
||||||
|
|
||||||
|
addToRunTimeSelectionTable
|
||||||
|
(
|
||||||
|
heatTransferModel,
|
||||||
|
constantHeatTransfer,
|
||||||
|
dictionary
|
||||||
|
);
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::surfaceFilmModels::constantHeatTransfer::constantHeatTransfer
|
constantHeatTransfer::constantHeatTransfer
|
||||||
(
|
(
|
||||||
const surfaceFilmModel& owner,
|
const surfaceFilmModel& owner,
|
||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
@ -60,20 +64,19 @@ Foam::surfaceFilmModels::constantHeatTransfer::constantHeatTransfer
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::surfaceFilmModels::constantHeatTransfer::~constantHeatTransfer()
|
constantHeatTransfer::~constantHeatTransfer()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::surfaceFilmModels::constantHeatTransfer::correct()
|
void constantHeatTransfer::correct()
|
||||||
{
|
{
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField>
|
tmp<volScalarField> constantHeatTransfer::h() const
|
||||||
Foam::surfaceFilmModels::constantHeatTransfer::h() const
|
|
||||||
{
|
{
|
||||||
return tmp<volScalarField>
|
return tmp<volScalarField>
|
||||||
(
|
(
|
||||||
@ -83,12 +86,12 @@ Foam::surfaceFilmModels::constantHeatTransfer::h() const
|
|||||||
(
|
(
|
||||||
"htc",
|
"htc",
|
||||||
owner_.time().timeName(),
|
owner_.time().timeName(),
|
||||||
owner_.film(),
|
owner_.regionMesh(),
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::NO_WRITE,
|
IOobject::NO_WRITE,
|
||||||
false
|
false
|
||||||
),
|
),
|
||||||
owner_.film(),
|
owner_.regionMesh(),
|
||||||
dimensionedScalar
|
dimensionedScalar
|
||||||
(
|
(
|
||||||
"c0",
|
"c0",
|
||||||
@ -101,5 +104,10 @@ Foam::surfaceFilmModels::constantHeatTransfer::h() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,7 +19,8 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::constantHeatTransfer
|
Foam::constantHeatTransfer
|
||||||
@ -42,6 +43,8 @@ SourceFiles
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
namespace surfaceFilmModels
|
namespace surfaceFilmModels
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -105,6 +108,7 @@ public:
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace surfaceFilmModels
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,51 +19,59 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "heatTransferModel.H"
|
#include "heatTransferModel.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
namespace surfaceFilmModels
|
namespace regionModels
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(heatTransferModel, 0);
|
namespace surfaceFilmModels
|
||||||
defineRunTimeSelectionTable(heatTransferModel, dictionary);
|
{
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
defineTypeNameAndDebug(heatTransferModel, 0);
|
||||||
|
defineRunTimeSelectionTable(heatTransferModel, dictionary);
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::surfaceFilmModels::heatTransferModel::heatTransferModel
|
heatTransferModel::heatTransferModel
|
||||||
(
|
(
|
||||||
const surfaceFilmModel& owner
|
const surfaceFilmModel& owner
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
owner_(owner)
|
subModelBase(owner)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
Foam::surfaceFilmModels::heatTransferModel::heatTransferModel
|
heatTransferModel::heatTransferModel
|
||||||
(
|
(
|
||||||
const word& type,
|
const word& type,
|
||||||
const surfaceFilmModel& owner,
|
const surfaceFilmModel& owner,
|
||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
owner_(owner),
|
subModelBase(type, owner, dict)
|
||||||
coeffs_(dict.subDict(type + "Coeffs"))
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::surfaceFilmModels::heatTransferModel::~heatTransferModel()
|
heatTransferModel::~heatTransferModel()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,30 +19,33 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::heatTransferModel
|
Foam::heatTransferModel
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Base class for heat transfer models
|
Base class for film heat transfer models
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
heatTransferModelI.H
|
|
||||||
heatTransferModel.C
|
heatTransferModel.C
|
||||||
|
heatTransferModelNew.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef heatTransferModel_H
|
#ifndef heatTransferModel_H
|
||||||
#define heatTransferModel_H
|
#define heatTransferModel_H
|
||||||
|
|
||||||
#include "surfaceFilmModel.H"
|
#include "subModelBase.H"
|
||||||
#include "runTimeSelectionTables.H"
|
#include "runTimeSelectionTables.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
namespace surfaceFilmModels
|
namespace surfaceFilmModels
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -51,6 +54,8 @@ namespace surfaceFilmModels
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class heatTransferModel
|
class heatTransferModel
|
||||||
|
:
|
||||||
|
public subModelBase
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@ -63,17 +68,6 @@ private:
|
|||||||
void operator=(const heatTransferModel&);
|
void operator=(const heatTransferModel&);
|
||||||
|
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
// Protected data
|
|
||||||
|
|
||||||
//- Reference to the owner surface film model
|
|
||||||
const surfaceFilmModel& owner_;
|
|
||||||
|
|
||||||
//- Model coefficients dictionary
|
|
||||||
dictionary coeffs_;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
@ -124,15 +118,6 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
// Access
|
|
||||||
|
|
||||||
//- Return the reference to the owner surface film model
|
|
||||||
inline const surfaceFilmModel& owner() const;
|
|
||||||
|
|
||||||
//- Return the model coefficients dictionary
|
|
||||||
inline const dictionary& coeffs() const;
|
|
||||||
|
|
||||||
|
|
||||||
// Evolution
|
// Evolution
|
||||||
|
|
||||||
//- Correct
|
//- Correct
|
||||||
@ -146,14 +131,11 @@ public:
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace surfaceFilmModels
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "heatTransferModelI.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,16 +19,25 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "heatTransferModel.H"
|
#include "heatTransferModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
namespace surfaceFilmModels
|
||||||
|
{
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::autoPtr<Foam::surfaceFilmModels::heatTransferModel>
|
autoPtr<heatTransferModel> heatTransferModel::New
|
||||||
Foam::surfaceFilmModels::heatTransferModel::New
|
|
||||||
(
|
(
|
||||||
const surfaceFilmModel& model,
|
const surfaceFilmModel& model,
|
||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
@ -48,7 +57,7 @@ Foam::surfaceFilmModels::heatTransferModel::New
|
|||||||
"heatTransferModel::New(const surfaceFilmModel&, const dictionary&)"
|
"heatTransferModel::New(const surfaceFilmModel&, const dictionary&)"
|
||||||
) << "Unknown heatTransferModel type " << modelType << nl << nl
|
) << "Unknown heatTransferModel type " << modelType << nl << nl
|
||||||
<< "Valid heatTransferModel types are:" << nl
|
<< "Valid heatTransferModel types are:" << nl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->toc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,4 +65,10 @@ Foam::surfaceFilmModels::heatTransferModel::New
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,7 +19,8 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -28,33 +29,34 @@ License
|
|||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "kinematicSingleLayer.H"
|
#include "kinematicSingleLayer.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
namespace surfaceFilmModels
|
namespace regionModels
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(mappedConvectiveHeatTransfer, 0);
|
namespace surfaceFilmModels
|
||||||
addToRunTimeSelectionTable
|
{
|
||||||
(
|
|
||||||
heatTransferModel,
|
|
||||||
mappedConvectiveHeatTransfer,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
defineTypeNameAndDebug(mappedConvectiveHeatTransfer, 0);
|
||||||
|
|
||||||
|
addToRunTimeSelectionTable
|
||||||
|
(
|
||||||
|
heatTransferModel,
|
||||||
|
mappedConvectiveHeatTransfer,
|
||||||
|
dictionary
|
||||||
|
);
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::surfaceFilmModels::mappedConvectiveHeatTransfer::
|
mappedConvectiveHeatTransfer::mappedConvectiveHeatTransfer
|
||||||
mappedConvectiveHeatTransfer
|
|
||||||
(
|
(
|
||||||
const surfaceFilmModel& owner,
|
const surfaceFilmModel& owner,
|
||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
// heatTransferModel(typeName, owner, dict),
|
|
||||||
heatTransferModel(owner),
|
heatTransferModel(owner),
|
||||||
htcConvPrimary_
|
htcConvPrimary_
|
||||||
(
|
(
|
||||||
@ -62,11 +64,11 @@ mappedConvectiveHeatTransfer
|
|||||||
(
|
(
|
||||||
"htcConv",
|
"htcConv",
|
||||||
owner.time().timeName(),
|
owner.time().timeName(),
|
||||||
owner.mesh(),
|
owner.primaryMesh(),
|
||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
owner.mesh()
|
owner.primaryMesh()
|
||||||
),
|
),
|
||||||
htcConvFilm_
|
htcConvFilm_
|
||||||
(
|
(
|
||||||
@ -74,13 +76,13 @@ mappedConvectiveHeatTransfer
|
|||||||
(
|
(
|
||||||
htcConvPrimary_.name(), // must have same name as above for mapping
|
htcConvPrimary_.name(), // must have same name as above for mapping
|
||||||
owner.time().timeName(),
|
owner.time().timeName(),
|
||||||
owner.film(),
|
owner.regionMesh(),
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
owner.film(),
|
owner.regionMesh(),
|
||||||
dimensionedScalar("zero", dimMass/pow3(dimTime)/dimTemperature, 0.0),
|
dimensionedScalar("zero", dimMass/pow3(dimTime)/dimTemperature, 0.0),
|
||||||
refCast<const kinematicSingleLayer>(owner).pSp().boundaryField().types()
|
owner.mappedPushedFieldPatchTypes<scalar>()
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Update the primary-side convective heat transfer coefficient
|
// Update the primary-side convective heat transfer coefficient
|
||||||
@ -93,14 +95,13 @@ mappedConvectiveHeatTransfer
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::surfaceFilmModels::mappedConvectiveHeatTransfer::
|
mappedConvectiveHeatTransfer::~mappedConvectiveHeatTransfer()
|
||||||
~mappedConvectiveHeatTransfer()
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::surfaceFilmModels::mappedConvectiveHeatTransfer::correct()
|
void mappedConvectiveHeatTransfer::correct()
|
||||||
{
|
{
|
||||||
// Update the primary-side convective heat transfer coefficient
|
// Update the primary-side convective heat transfer coefficient
|
||||||
htcConvPrimary_.correctBoundaryConditions();
|
htcConvPrimary_.correctBoundaryConditions();
|
||||||
@ -110,12 +111,16 @@ void Foam::surfaceFilmModels::mappedConvectiveHeatTransfer::correct()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField>
|
tmp<volScalarField> mappedConvectiveHeatTransfer::h() const
|
||||||
Foam::surfaceFilmModels::mappedConvectiveHeatTransfer::h() const
|
|
||||||
{
|
{
|
||||||
return htcConvFilm_;
|
return htcConvFilm_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,7 +19,8 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::mappedConvectiveHeatTransfer
|
Foam::mappedConvectiveHeatTransfer
|
||||||
@ -43,6 +44,8 @@ SourceFiles
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
namespace surfaceFilmModels
|
namespace surfaceFilmModels
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -111,6 +114,7 @@ public:
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace surfaceFilmModels
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,28 +19,31 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "noPhaseChange.H"
|
#include "noPhaseChange.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
namespace surfaceFilmModels
|
namespace regionModels
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(noPhaseChange, 0);
|
namespace surfaceFilmModels
|
||||||
addToRunTimeSelectionTable(phaseChangeModel, noPhaseChange, dictionary);
|
{
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
defineTypeNameAndDebug(noPhaseChange, 0);
|
||||||
|
addToRunTimeSelectionTable(phaseChangeModel, noPhaseChange, dictionary);
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::surfaceFilmModels::noPhaseChange::noPhaseChange
|
noPhaseChange::noPhaseChange
|
||||||
(
|
(
|
||||||
const surfaceFilmModel& owner,
|
const surfaceFilmModel& owner,
|
||||||
const dictionary&
|
const dictionary&
|
||||||
@ -52,13 +55,13 @@ Foam::surfaceFilmModels::noPhaseChange::noPhaseChange
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::surfaceFilmModels::noPhaseChange::~noPhaseChange()
|
noPhaseChange::~noPhaseChange()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::surfaceFilmModels::noPhaseChange::correct
|
void noPhaseChange::correct
|
||||||
(
|
(
|
||||||
const scalar,
|
const scalar,
|
||||||
scalarField&,
|
scalarField&,
|
||||||
@ -69,10 +72,10 @@ void Foam::surfaceFilmModels::noPhaseChange::correct
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::surfaceFilmModels::noPhaseChange::info() const
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
{
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,7 +19,8 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::noPhaseChange
|
Foam::noPhaseChange
|
||||||
@ -41,6 +42,8 @@ SourceFiles
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
namespace surfaceFilmModels
|
namespace surfaceFilmModels
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -90,18 +93,13 @@ public:
|
|||||||
scalarField& dMass,
|
scalarField& dMass,
|
||||||
scalarField& dEnergy
|
scalarField& dEnergy
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Input/output
|
|
||||||
|
|
||||||
//- Output model statistics
|
|
||||||
virtual void info() const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace surfaceFilmModels
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -0,0 +1,77 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
|
\\/ 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 2 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, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "phaseChangeModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
namespace surfaceFilmModels
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
defineTypeNameAndDebug(phaseChangeModel, 0);
|
||||||
|
defineRunTimeSelectionTable(phaseChangeModel, dictionary);
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
phaseChangeModel::phaseChangeModel
|
||||||
|
(
|
||||||
|
const surfaceFilmModel& owner
|
||||||
|
)
|
||||||
|
:
|
||||||
|
subModelBase(owner)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
phaseChangeModel::phaseChangeModel
|
||||||
|
(
|
||||||
|
const word& type,
|
||||||
|
const surfaceFilmModel& owner,
|
||||||
|
const dictionary& dict
|
||||||
|
)
|
||||||
|
:
|
||||||
|
subModelBase(type, owner, dict)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
phaseChangeModel::~phaseChangeModel()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // end namespace surfaceFilmModels
|
||||||
|
} // end namespace regionModels
|
||||||
|
} // end namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,24 +19,25 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::phaseChangeModel
|
Foam::phaseChangeModel
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Phase change model for surface film modelling.
|
Base class for surface film phase change models
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
phaseChangeModelI.H
|
|
||||||
phaseChangeModel.C
|
phaseChangeModel.C
|
||||||
|
phaseChangeModelNew.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef phaseChangeModel_H
|
#ifndef phaseChangeModel_H
|
||||||
#define phaseChangeModel_H
|
#define phaseChangeModel_H
|
||||||
|
|
||||||
#include "surfaceFilmModel.H"
|
#include "subModelBase.H"
|
||||||
#include "runTimeSelectionTables.H"
|
#include "runTimeSelectionTables.H"
|
||||||
#include "scalarField.H"
|
#include "scalarField.H"
|
||||||
|
|
||||||
@ -44,6 +45,8 @@ SourceFiles
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
namespace surfaceFilmModels
|
namespace surfaceFilmModels
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -52,6 +55,8 @@ namespace surfaceFilmModels
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class phaseChangeModel
|
class phaseChangeModel
|
||||||
|
:
|
||||||
|
public subModelBase
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@ -64,17 +69,6 @@ private:
|
|||||||
void operator=(const phaseChangeModel&);
|
void operator=(const phaseChangeModel&);
|
||||||
|
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
// Protected data
|
|
||||||
|
|
||||||
//- Reference to the owner surface film model
|
|
||||||
const surfaceFilmModel& owner_;
|
|
||||||
|
|
||||||
//- Model coefficients dictionary
|
|
||||||
dictionary coeffs_;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
@ -125,15 +119,6 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
// Access
|
|
||||||
|
|
||||||
//- Return the reference to the owner surface film model
|
|
||||||
inline const surfaceFilmModel& owner() const;
|
|
||||||
|
|
||||||
//- Return the model coefficients dictionary
|
|
||||||
inline const dictionary& coeffs() const;
|
|
||||||
|
|
||||||
|
|
||||||
// Evolution
|
// Evolution
|
||||||
|
|
||||||
//- Correct
|
//- Correct
|
||||||
@ -143,26 +128,17 @@ public:
|
|||||||
scalarField& dMass,
|
scalarField& dMass,
|
||||||
scalarField& dEnergy
|
scalarField& dEnergy
|
||||||
) = 0;
|
) = 0;
|
||||||
|
|
||||||
|
|
||||||
// Input/output
|
|
||||||
|
|
||||||
//- Output model statistics
|
|
||||||
virtual void info() const = 0;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace surfaceFilmModels
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "phaseChangeModelI.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,16 +19,25 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "phaseChangeModel.H"
|
#include "phaseChangeModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
namespace surfaceFilmModels
|
||||||
|
{
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::autoPtr<Foam::surfaceFilmModels::phaseChangeModel>
|
autoPtr<phaseChangeModel> phaseChangeModel::New
|
||||||
Foam::surfaceFilmModels::phaseChangeModel::New
|
|
||||||
(
|
(
|
||||||
const surfaceFilmModel& model,
|
const surfaceFilmModel& model,
|
||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
@ -48,7 +57,7 @@ Foam::surfaceFilmModels::phaseChangeModel::New
|
|||||||
"phaseChangeModel::New(const surfaceFilmModel&, const dictionary&)"
|
"phaseChangeModel::New(const surfaceFilmModel&, const dictionary&)"
|
||||||
) << "Unknown phaseChangeModel type " << modelType
|
) << "Unknown phaseChangeModel type " << modelType
|
||||||
<< nl << nl << "Valid phaseChangeModel types are:" << nl
|
<< nl << nl << "Valid phaseChangeModel types are:" << nl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->toc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,4 +65,10 @@ Foam::surfaceFilmModels::phaseChangeModel::New
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // end namespace surfaceFilmModels
|
||||||
|
} // end namespace regionModels
|
||||||
|
} // end namespace Foam
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -8,10 +8,10 @@
|
|||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,7 +19,8 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -29,26 +30,29 @@ License
|
|||||||
#include "specie.H"
|
#include "specie.H"
|
||||||
#include "heatTransferModel.H"
|
#include "heatTransferModel.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
namespace surfaceFilmModels
|
namespace regionModels
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(standardPhaseChange, 0);
|
namespace surfaceFilmModels
|
||||||
addToRunTimeSelectionTable
|
{
|
||||||
(
|
|
||||||
phaseChangeModel,
|
|
||||||
standardPhaseChange,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
defineTypeNameAndDebug(standardPhaseChange, 0);
|
||||||
|
|
||||||
|
addToRunTimeSelectionTable
|
||||||
|
(
|
||||||
|
phaseChangeModel,
|
||||||
|
standardPhaseChange,
|
||||||
|
dictionary
|
||||||
|
);
|
||||||
|
|
||||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::scalar Foam::surfaceFilmModels::standardPhaseChange::Sh
|
scalar standardPhaseChange::Sh
|
||||||
(
|
(
|
||||||
const scalar Re,
|
const scalar Re,
|
||||||
const scalar Sc
|
const scalar Sc
|
||||||
@ -67,7 +71,7 @@ Foam::scalar Foam::surfaceFilmModels::standardPhaseChange::Sh
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::surfaceFilmModels::standardPhaseChange::standardPhaseChange
|
standardPhaseChange::standardPhaseChange
|
||||||
(
|
(
|
||||||
const surfaceFilmModel& owner,
|
const surfaceFilmModel& owner,
|
||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
@ -85,22 +89,19 @@ Foam::surfaceFilmModels::standardPhaseChange::standardPhaseChange
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::surfaceFilmModels::standardPhaseChange::~standardPhaseChange()
|
standardPhaseChange::~standardPhaseChange()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::surfaceFilmModels::standardPhaseChange::correct
|
void standardPhaseChange::correct
|
||||||
(
|
(
|
||||||
const scalar dt,
|
const scalar dt,
|
||||||
scalarField& dMass,
|
scalarField& dMass,
|
||||||
scalarField& dEnergy
|
scalarField& dEnergy
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
dMass = 0.0;
|
|
||||||
dEnergy = 0.0;
|
|
||||||
|
|
||||||
const thermoSingleLayer& film = refCast<const thermoSingleLayer>(owner_);
|
const thermoSingleLayer& film = refCast<const thermoSingleLayer>(owner_);
|
||||||
|
|
||||||
// set local thermo properties
|
// set local thermo properties
|
||||||
@ -120,10 +121,10 @@ void Foam::surfaceFilmModels::standardPhaseChange::correct
|
|||||||
const scalarField& rhoInf = film.rhoPrimary();
|
const scalarField& rhoInf = film.rhoPrimary();
|
||||||
const scalarField& muInf = film.muPrimary();
|
const scalarField& muInf = film.muPrimary();
|
||||||
const scalarField& magSf = film.magSf();
|
const scalarField& magSf = film.magSf();
|
||||||
const scalarField hInf(film.htcs().h());
|
const scalarField hInf = film.htcs().h();
|
||||||
const scalarField hFilm(film.htcw().h());
|
const scalarField hFilm = film.htcw().h();
|
||||||
const vectorField dU(film.UPrimary() - film.Us());
|
const vectorField dU = film.UPrimary() - film.Us();
|
||||||
const scalarField availableMass((delta - deltaMin_)*rho*magSf);
|
const scalarField availableMass = (delta - deltaMin_)*rho*magSf;
|
||||||
|
|
||||||
|
|
||||||
forAll(dMass, cellI)
|
forAll(dMass, cellI)
|
||||||
@ -156,7 +157,6 @@ void Foam::surfaceFilmModels::standardPhaseChange::correct
|
|||||||
dMass[cellI] =
|
dMass[cellI] =
|
||||||
dt*magSf[cellI]/hVap*(qDotInf + qDotFilm)
|
dt*magSf[cellI]/hVap*(qDotInf + qDotFilm)
|
||||||
+ qCorr/hVap;
|
+ qCorr/hVap;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -206,7 +206,7 @@ void Foam::surfaceFilmModels::standardPhaseChange::correct
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::surfaceFilmModels::standardPhaseChange::info() const
|
void standardPhaseChange::info() const
|
||||||
{
|
{
|
||||||
Info<< indent << "mass phase change = "
|
Info<< indent << "mass phase change = "
|
||||||
<< returnReduce(totalMass_, sumOp<scalar>()) << nl
|
<< returnReduce(totalMass_, sumOp<scalar>()) << nl
|
||||||
@ -215,4 +215,10 @@ void Foam::surfaceFilmModels::standardPhaseChange::info() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by the
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
(at your option) any later version.
|
option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,13 +19,14 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::standardPhaseChange
|
Foam::standardPhaseChange
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
Standard phase change model with modification for boiling
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
standardPhaseChange.C
|
standardPhaseChange.C
|
||||||
@ -41,6 +42,8 @@ SourceFiles
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
namespace surfaceFilmModels
|
namespace surfaceFilmModels
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -136,6 +139,7 @@ public:
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace surfaceFilmModels
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -0,0 +1,166 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
|
\\/ 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 2 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, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "surfaceFilmModel.H"
|
||||||
|
#include "fvMesh.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<>
|
||||||
|
const char* Foam::NamedEnum
|
||||||
|
<
|
||||||
|
Foam::regionModels::surfaceFilmModels::surfaceFilmModel::thermoModelType,
|
||||||
|
2
|
||||||
|
>::names[] =
|
||||||
|
{
|
||||||
|
"constant",
|
||||||
|
"singleComponent"
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const Foam::NamedEnum
|
||||||
|
<
|
||||||
|
Foam::regionModels::surfaceFilmModels::surfaceFilmModel::thermoModelType,
|
||||||
|
2
|
||||||
|
>
|
||||||
|
Foam::regionModels::surfaceFilmModels::surfaceFilmModel::thermoModelTypeNames_;
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace regionModels
|
||||||
|
{
|
||||||
|
namespace surfaceFilmModels
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
defineTypeNameAndDebug(surfaceFilmModel, 0);
|
||||||
|
defineRunTimeSelectionTable(surfaceFilmModel, mesh);
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
|
bool surfaceFilmModel::read()
|
||||||
|
{
|
||||||
|
if (singleLayerRegion::read())
|
||||||
|
{
|
||||||
|
thermoModel_ =
|
||||||
|
thermoModelTypeNames_.read(coeffs_.lookup("thermoModel"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
surfaceFilmModel::surfaceFilmModel(const fvMesh& mesh)
|
||||||
|
:
|
||||||
|
singleLayerRegion(mesh),
|
||||||
|
g_(vector::zero),
|
||||||
|
thermoModel_(tmConstant)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
surfaceFilmModel::surfaceFilmModel
|
||||||
|
(
|
||||||
|
const word& modelType,
|
||||||
|
const fvMesh& mesh,
|
||||||
|
const dimensionedVector& g
|
||||||
|
)
|
||||||
|
:
|
||||||
|
singleLayerRegion(mesh, "surfaceFilm", modelType),
|
||||||
|
g_(g),
|
||||||
|
thermoModel_(tmConstant)
|
||||||
|
{
|
||||||
|
if (active_)
|
||||||
|
{
|
||||||
|
read();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
surfaceFilmModel::~surfaceFilmModel()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::scalar surfaceFilmModel::CourantNumber() const
|
||||||
|
{
|
||||||
|
return ROOTVSMALL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
tmp<DimensionedField<scalar, volMesh> > surfaceFilmModel::Srho() const
|
||||||
|
{
|
||||||
|
notImplemented
|
||||||
|
(
|
||||||
|
"tmp<DimensionedField<scalar, volMesh> > surfaceFilmModel::Srho() const"
|
||||||
|
)
|
||||||
|
|
||||||
|
return tmp<DimensionedField<scalar, volMesh> >(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
tmp<DimensionedField<scalar, volMesh> >
|
||||||
|
surfaceFilmModel::Srho(const label) const
|
||||||
|
{
|
||||||
|
notImplemented
|
||||||
|
(
|
||||||
|
"tmp<DimensionedField<scalar, volMesh> > surfaceFilmModel::Srho"
|
||||||
|
"(const label) const"
|
||||||
|
)
|
||||||
|
|
||||||
|
return tmp<DimensionedField<scalar, volMesh> >(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
tmp<DimensionedField<scalar, volMesh> > surfaceFilmModel::Sh() const
|
||||||
|
{
|
||||||
|
notImplemented
|
||||||
|
(
|
||||||
|
"tmp<DimensionedField<scalar, volMesh> > surfaceFilmModel::Sh() const"
|
||||||
|
)
|
||||||
|
|
||||||
|
return tmp<DimensionedField<scalar, volMesh> >(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace surfaceFilmModels
|
||||||
|
} // End namespace regionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user