Tutorial fixes

This commit is contained in:
Hrvoje Jasak 2010-11-08 20:23:07 +00:00
parent cfe9b5428f
commit eb59ac4769
25 changed files with 110 additions and 83 deletions

View file

@ -4,7 +4,14 @@
U = UEqn.H()/UEqn.A();
phi = fvc::interpolate(U) & mesh.Sf();
surfaceScalarField phiU = phi;
// Bug fix: must change name of phi on copy to keep objectRegistry happy
// HJ, 7/Nov/2010
surfaceScalarField phiU
(
"phiU",
phi
);
surfaceScalarField phip = fvc::interpolate(psiByRho)*phi;

View file

@ -202,7 +202,14 @@ void Foam::kineticTheoryModel::solve()
word scheme("div(phi,Theta)");
volScalarField alpha = alpha_;
// Bug fix: copying field alpha without mane change vreaks objectRegistry
// HJ, 7/Nov/2010
volScalarField alpha
(
"alphaMinMax",
alpha_
);
alpha.max(1.0e-6);
const scalar sqrtPi = sqrt(mathematicalConstant::pi);

View file

@ -51,7 +51,7 @@ Foam::BlockBiCGStabSolver<Type>::BlockBiCGStabSolver
BlockLduPrecon<Type>::New
(
matrix,
this->dict().subDict("preconditioner")
this->dict()
)
)
{}

View file

@ -51,7 +51,7 @@ Foam::BlockCGSolver<Type>::BlockCGSolver
BlockLduPrecon<Type>::New
(
matrix,
this->dict().subDict("preconditioner")
this->dict()
)
)
{}

View file

@ -85,7 +85,7 @@ Foam::BlockGMRESSolver<Type>::BlockGMRESSolver
BlockLduPrecon<Type>::New
(
matrix,
this->dict().subDict("preconditioner")
this->dict()
)
),
nDirs_(readLabel(this->dict().lookup("nDirections")))

View file

@ -1,8 +1,8 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5-dev |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / F ield | OpenFOAM Extend Project: Open source CFD |
| \\ / O peration | Version: 1.6-ext |
| \\ / A nd | Web: www.extend-project.de |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

View file

@ -1,8 +1,8 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / F ield | OpenFOAM Extend Project: Open source CFD |
| \\ / O peration | Version: 1.6-ext |
| \\ / A nd | Web: www.extend-project.de |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
@ -21,25 +21,25 @@ FoamFile
{
type patch;
nFaces 51;
startFace 15151;
startFace 23114;
}
outlet
{
type patch;
nFaces 51;
startFace 15202;
startFace 23165;
}
walls
{
type wall;
nFaces 436;
startFace 15253;
nFaces 512;
startFace 23216;
}
frontBack
{
type empty;
nFaces 15420;
startFace 15689;
nFaces 23340;
startFace 23728;
}
)

View file

@ -30,6 +30,7 @@ boundaryField
top
{
type inletOutlet;
phi phia;
inletValue uniform 1.0e-8;
}
@ -38,10 +39,10 @@ boundaryField
type zeroGradient;
}
frontBack
{
type empty;
}
frontBack
{
type empty;
}
}

View file

@ -29,6 +29,7 @@ boundaryField
top
{
type inletOutlet;
phi phia;
inletValue uniform (0 0 0);
value uniform ( 0 0 0 );
}

View file

@ -29,6 +29,7 @@ boundaryField
top
{
type inletOutlet;
phi phib;
value uniform (0 0 0);
inletValue uniform ( 0 0 0 );
}

View file

@ -29,6 +29,7 @@ boundaryField
top
{
type inletOutlet;
phi phia;
inletValue uniform 0;
}

View file

@ -29,6 +29,7 @@ boundaryField
top
{
type inletOutlet;
phi phia;
inletValue uniform 10.0;
value uniform 10.0;
}

View file

@ -29,6 +29,7 @@ boundaryField
top
{
type inletOutlet;
phi phia;
inletValue uniform 1.0;
value uniform 1.0;
}

View file

@ -1,8 +1,8 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / F ield | OpenFOAM Extend Project: Open source CFD |
| \\ / O peration | Version: 1.6-ext |
| \\ / A nd | Web: www.extend-project.de |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
@ -10,6 +10,7 @@ FoamFile
version 2.0;
format binary;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View file

@ -24,21 +24,21 @@ boundaryField
{
walls
{
type fixedValue;
value uniform (0 0 0);
type fixedValue;
value uniform (0 0 0);
}
outlet
{
type zeroGradient;
type zeroGradient;
}
inlet
{
type fixedValue;
value uniform (0 0.25 0);
type fixedValue;
value uniform (0 0.25 0);
}
frontAndBackPlanes
{
type empty;
type empty;
}
}

View file

@ -29,6 +29,7 @@ boundaryField
outlet
{
type inletOutlet;
phi phia;
inletValue uniform 10.0;
value uniform 10.0;
}

View file

@ -29,6 +29,7 @@ boundaryField
outlet
{
type inletOutlet;
phi phia;
inletValue uniform 1.0;
value uniform 1.0;
}

View file

@ -1,8 +1,8 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / F ield | OpenFOAM Extend Project: Open source CFD |
| \\ / O peration | Version: 1.6-ext |
| \\ / A nd | Web: www.extend-project.de |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

View file

@ -20,25 +20,26 @@ internalField uniform 0.0;
boundaryField
{
inlet
inlet
{
type fixedValue;
value uniform 1.0e-7;
}
outlet
outlet
{
type inletOutlet;
phi phia;
inletValue uniform 1.0e-7;
value uniform 1.0e-7;
}
walls
walls
{
type zeroGradient;
}
defaultFaces
defaultFaces
{
type empty;
}

View file

@ -1899,15 +1899,16 @@ internalField nonuniform List<vector>
boundaryField
{
inlet
inlet
{
type fixedValue;
value uniform (0 0.1 0);
}
outlet
outlet
{
type inletOutlet;
phi phia;
inletValue uniform (0 0 0);
value nonuniform List<vector>
25

View file

@ -1899,15 +1899,16 @@ internalField nonuniform List<vector>
boundaryField
{
inlet
inlet
{
type fixedValue;
value uniform (0 0 0);
}
outlet
outlet
{
type inletOutlet;
phi phib;
inletValue uniform (0 0 0);
value nonuniform List<vector>
25

View file

@ -1899,25 +1899,26 @@ internalField nonuniform List<scalar>
boundaryField
{
inlet
inlet
{
type fixedValue;
value uniform 0.5;
}
outlet
outlet
{
type inletOutlet;
phi phia;
inletValue uniform 1;
value uniform 1;
}
walls
walls
{
type zeroGradient;
}
defaultFaces
defaultFaces
{
type empty;
}

View file

@ -20,25 +20,26 @@ internalField uniform 0.1;
boundaryField
{
inlet
inlet
{
type fixedValue;
value uniform 0.1;
}
outlet
outlet
{
type inletOutlet;
phi phia;
inletValue uniform 0.1;
value uniform 0.1;
}
walls
walls
{
type zeroGradient;
}
defaultFaces
defaultFaces
{
type empty;
}

View file

@ -20,25 +20,26 @@ internalField uniform 1e-8;
boundaryField
{
inlet
inlet
{
type fixedValue;
value uniform 1e-8;
}
outlet
outlet
{
type inletOutlet;
phi phia;
inletValue uniform 1e-8;
value uniform 1e-8;
}
walls
walls
{
type zeroGradient;
}
defaultFaces
defaultFaces
{
type empty;
}

View file

@ -1,8 +1,8 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / F ield | OpenFOAM Extend Project: Open source CFD |
| \\ / O peration | Version: 1.6-ext |
| \\ / A nd | Web: www.extend-project.de |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
@ -10,39 +10,37 @@ FoamFile
version 2.0;
format ascii;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
4
(
inlet
{
type patch;
nFaces 25;
startFace 3650;
}
outlet
{
type patch;
nFaces 25;
startFace 3675;
}
walls
{
type wall;
nFaces 150;
startFace 3700;
}
defaultFaces
{
type empty;
nFaces 3750;
startFace 3850;
}
inlet
{
type patch;
nFaces 25;
startFace 3650;
}
outlet
{
type patch;
nFaces 25;
startFace 3675;
}
walls
{
type wall;
nFaces 150;
startFace 3700;
}
defaultFaces
{
type empty;
nFaces 3750;
startFace 3850;
}
)
// ************************************************************************* //