Merge branch 'master' of ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
commit
7ad0be020e
@ -30,7 +30,7 @@ if (ign.ignited())
|
||||
n /= mgb;
|
||||
|
||||
|
||||
# include "StCorr.H"
|
||||
#include "StCorr.H"
|
||||
|
||||
// Calculate turbulent flame speed flux
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@ -58,7 +58,7 @@ if (ign.ignited())
|
||||
|
||||
// Add ignition cell contribution to b-equation
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# include "ignite.H"
|
||||
#include "ignite.H"
|
||||
|
||||
|
||||
// Solve for b
|
||||
@ -134,7 +134,7 @@ if (ign.ignited())
|
||||
(sigmas*SuInf*(Su0 - SuInf) + sqr(SuMin)*sigmaExt)
|
||||
/(sqr(Su0 - SuInf) + sqr(SuMin));
|
||||
|
||||
solve
|
||||
fvScalarMatrix SuEqn
|
||||
(
|
||||
fvm::ddt(rho, Su)
|
||||
+ fvm::div(phi + phiXi, Su, "div(phiXi,Su)")
|
||||
@ -144,6 +144,9 @@ if (ign.ignited())
|
||||
- fvm::SuSp(rho*(sigmas + Rc), Su)
|
||||
);
|
||||
|
||||
SuEqn.relax();
|
||||
SuEqn.solve();
|
||||
|
||||
// Limit the maximum Su
|
||||
// ~~~~~~~~~~~~~~~~~~~~
|
||||
Su.min(SuMax);
|
||||
@ -196,7 +199,7 @@ if (ign.ignited())
|
||||
|
||||
// Solve for the flame wrinkling
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
solve
|
||||
fvScalarMatrix XiEqn
|
||||
(
|
||||
fvm::ddt(rho, Xi)
|
||||
+ fvm::div(phi + phiXi, Xi, "div(phiXi,Xi)")
|
||||
@ -215,6 +218,8 @@ if (ign.ignited())
|
||||
)
|
||||
);
|
||||
|
||||
XiEqn.relax();
|
||||
XiEqn.solve();
|
||||
|
||||
// Correct boundedness of Xi
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
8
applications/solvers/heatTransfer/chtMultiRegionFoam/Allwclean
Executable file
8
applications/solvers/heatTransfer/chtMultiRegionFoam/Allwclean
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
set -x
|
||||
|
||||
wclean
|
||||
wclean chtMultiRegionSimpleFoam
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
8
applications/solvers/heatTransfer/chtMultiRegionFoam/Allwmake
Executable file
8
applications/solvers/heatTransfer/chtMultiRegionFoam/Allwmake
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
set -x
|
||||
|
||||
wmake
|
||||
wmake chtMultiRegionSimpleFoam
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
@ -0,0 +1,4 @@
|
||||
chtMultiRegionSimpleFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/chtMultiRegionSimpleFoam
|
||||
|
@ -1,5 +1,7 @@
|
||||
EXE_INC = \
|
||||
/* -DFULLDEBUG -O0 -g */ \
|
||||
-I.. \
|
||||
-I../derivedFvPatchFields \
|
||||
-Ifluid \
|
||||
-Isolid \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
@ -1,5 +0,0 @@
|
||||
derivedFvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.C
|
||||
chtMultiRegionSimpleFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/chtMultiRegionSimpleFoam
|
||||
|
@ -1,168 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 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 "solidWallHeatFluxTemperatureFvPatchScalarField.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "volFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::solidWallHeatFluxTemperatureFvPatchScalarField::
|
||||
solidWallHeatFluxTemperatureFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedGradientFvPatchScalarField(p, iF),
|
||||
q_(p.size(), 0.0),
|
||||
KName_("undefined-K")
|
||||
{}
|
||||
|
||||
|
||||
Foam::solidWallHeatFluxTemperatureFvPatchScalarField::
|
||||
solidWallHeatFluxTemperatureFvPatchScalarField
|
||||
(
|
||||
const solidWallHeatFluxTemperatureFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedGradientFvPatchScalarField(ptf, p, iF, mapper),
|
||||
q_(ptf.q_, mapper),
|
||||
KName_(ptf.KName_)
|
||||
{}
|
||||
|
||||
|
||||
Foam::solidWallHeatFluxTemperatureFvPatchScalarField::
|
||||
solidWallHeatFluxTemperatureFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedGradientFvPatchScalarField(p, iF, dict),
|
||||
q_("q", dict, p.size()),
|
||||
KName_(dict.lookup("K"))
|
||||
{}
|
||||
|
||||
|
||||
Foam::solidWallHeatFluxTemperatureFvPatchScalarField::
|
||||
solidWallHeatFluxTemperatureFvPatchScalarField
|
||||
(
|
||||
const solidWallHeatFluxTemperatureFvPatchScalarField& tppsf
|
||||
)
|
||||
:
|
||||
fixedGradientFvPatchScalarField(tppsf),
|
||||
q_(tppsf.q_),
|
||||
KName_(tppsf.KName_)
|
||||
{}
|
||||
|
||||
|
||||
Foam::solidWallHeatFluxTemperatureFvPatchScalarField::
|
||||
solidWallHeatFluxTemperatureFvPatchScalarField
|
||||
(
|
||||
const solidWallHeatFluxTemperatureFvPatchScalarField& tppsf,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedGradientFvPatchScalarField(tppsf, iF),
|
||||
q_(tppsf.q_),
|
||||
KName_(tppsf.KName_)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::solidWallHeatFluxTemperatureFvPatchScalarField::autoMap
|
||||
(
|
||||
const fvPatchFieldMapper& m
|
||||
)
|
||||
{
|
||||
fixedGradientFvPatchScalarField::autoMap(m);
|
||||
q_.autoMap(m);
|
||||
}
|
||||
|
||||
|
||||
void Foam::solidWallHeatFluxTemperatureFvPatchScalarField::rmap
|
||||
(
|
||||
const fvPatchScalarField& ptf,
|
||||
const labelList& addr
|
||||
)
|
||||
{
|
||||
fixedGradientFvPatchScalarField::rmap(ptf, addr);
|
||||
|
||||
const solidWallHeatFluxTemperatureFvPatchScalarField& hfptf =
|
||||
refCast<const solidWallHeatFluxTemperatureFvPatchScalarField>(ptf);
|
||||
|
||||
q_.rmap(hfptf.q_, addr);
|
||||
}
|
||||
|
||||
|
||||
void Foam::solidWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
|
||||
{
|
||||
if (updated())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const scalarField& Kw = patch().lookupPatchField<volScalarField, scalar>
|
||||
(
|
||||
KName_
|
||||
);
|
||||
|
||||
gradient() = q_/Kw;
|
||||
|
||||
fixedGradientFvPatchScalarField::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
void Foam::solidWallHeatFluxTemperatureFvPatchScalarField::write
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
fixedGradientFvPatchScalarField::write(os);
|
||||
q_.writeEntry("q", os);
|
||||
os.writeKeyword("K") << KName_ << token::END_STATEMENT << nl;
|
||||
this->writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makePatchTypeField
|
||||
(
|
||||
fvPatchScalarField,
|
||||
solidWallHeatFluxTemperatureFvPatchScalarField
|
||||
);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -1,180 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 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
|
||||
solidWallHeatFluxTemperatureFvPatchScalarField
|
||||
|
||||
Description
|
||||
Heat flux boundary condition for temperature on solid region
|
||||
|
||||
Example usage:
|
||||
myWallPatch
|
||||
{
|
||||
type solidWallHeatFluxTemperature;
|
||||
K K; // Name of K field
|
||||
q uniform 1000; // Heat flux / [W/m2]
|
||||
value 300.0; // Initial temperature / [K]
|
||||
}
|
||||
|
||||
|
||||
SourceFiles
|
||||
solidWallHeatFluxTemperatureFvPatchScalarField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef solidWallHeatFluxTemperatureFvPatchScalarField_H
|
||||
#define solidWallHeatFluxTemperatureFvPatchScalarField_H
|
||||
|
||||
#include "fixedGradientFvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class solidWallHeatFluxTemperatureFvPatchScalarField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class solidWallHeatFluxTemperatureFvPatchScalarField
|
||||
:
|
||||
public fixedGradientFvPatchScalarField
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Heat flux / [W/m2]
|
||||
scalarField q_;
|
||||
|
||||
//- Name of thermal conductivity field
|
||||
word KName_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("solidWallHeatFluxTemperature");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
solidWallHeatFluxTemperatureFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
solidWallHeatFluxTemperatureFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const dictionary&
|
||||
);
|
||||
|
||||
//- Construct by mapping given
|
||||
// solidWallHeatFluxTemperatureFvPatchScalarField
|
||||
// onto a new patch
|
||||
solidWallHeatFluxTemperatureFvPatchScalarField
|
||||
(
|
||||
const solidWallHeatFluxTemperatureFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
solidWallHeatFluxTemperatureFvPatchScalarField
|
||||
(
|
||||
const solidWallHeatFluxTemperatureFvPatchScalarField&
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<fvPatchScalarField> clone() const
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
new solidWallHeatFluxTemperatureFvPatchScalarField(*this)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
solidWallHeatFluxTemperatureFvPatchScalarField
|
||||
(
|
||||
const solidWallHeatFluxTemperatureFvPatchScalarField&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<fvPatchScalarField> clone
|
||||
(
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
new solidWallHeatFluxTemperatureFvPatchScalarField(*this, iF)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
virtual void updateCoeffs();
|
||||
|
||||
|
||||
// Mapping functions
|
||||
|
||||
//- Map (and resize as needed) from self given a mapping object
|
||||
virtual void autoMap
|
||||
(
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
||||
virtual void rmap
|
||||
(
|
||||
const fvPatchScalarField&,
|
||||
const labelList&
|
||||
);
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write
|
||||
void write(Ostream&) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
@ -25,9 +25,9 @@ makeGraph(y, flowDirection & R & flowDirection, "Rff", gFormat);
|
||||
makeGraph(y, wallNormal & R & wallNormal, "Rww", gFormat);
|
||||
makeGraph(y, flowDirection & R & wallNormal, "Rfw", gFormat);
|
||||
|
||||
makeGraph(y, sqrt(mag(R.component(tensor::XX))), "u", gFormat);
|
||||
makeGraph(y, sqrt(mag(R.component(tensor::YY))), "v", gFormat);
|
||||
makeGraph(y, sqrt(mag(R.component(tensor::ZZ))), "w", gFormat);
|
||||
makeGraph(y, R.component(tensor::XY), "uv", gFormat);
|
||||
makeGraph(y, sqrt(mag(R.component(symmTensor::XX))), "u", gFormat);
|
||||
makeGraph(y, sqrt(mag(R.component(symmTensor::YY))), "v", gFormat);
|
||||
makeGraph(y, sqrt(mag(R.component(symmTensor::ZZ))), "w", gFormat);
|
||||
makeGraph(y, R.component(symmTensor::XY), "uv", gFormat);
|
||||
|
||||
makeGraph(y, mag(fvc::grad(U)), "gammaDot", gFormat);
|
||||
|
@ -150,9 +150,9 @@ int main(int argc, char *argv[])
|
||||
U -= rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
}
|
||||
}
|
||||
|
||||
turbulence->correct();
|
||||
turbulence->correct();
|
||||
}
|
||||
|
||||
runTime.write();
|
||||
|
||||
|
@ -206,9 +206,8 @@ void Foam::rawSurfaceWriter<Type>::writeData
|
||||
|
||||
const symmTensor& v = values[elemI];
|
||||
|
||||
os << v[0] << ' ' << v[1] << ' ' << v[2]
|
||||
<< v[3] << ' ' << v[4] << ' ' << v[5]
|
||||
<< nl;
|
||||
os << v[0] << ' ' << v[1] << ' ' << v[2] << ' '
|
||||
<< v[3] << ' ' << v[4] << ' ' << v[5] << nl;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -219,9 +218,8 @@ void Foam::rawSurfaceWriter<Type>::writeData
|
||||
|
||||
const symmTensor& v = values[elemI];
|
||||
|
||||
os << v[0] << ' ' << v[1] << ' ' << v[2]
|
||||
<< v[3] << ' ' << v[4] << ' ' << v[5]
|
||||
<< nl;
|
||||
os << v[0] << ' ' << v[1] << ' ' << v[2] << ' '
|
||||
<< v[3] << ' ' << v[4] << ' ' << v[5] << nl;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -254,8 +252,8 @@ void Foam::rawSurfaceWriter<Type>::writeData
|
||||
writeGeometry(points, elemI, os);
|
||||
|
||||
const tensor& v = values[elemI];
|
||||
os << v[0] << ' ' << v[1] << ' ' << v[2]
|
||||
<< v[3] << ' ' << v[4] << ' ' << v[5]
|
||||
os << v[0] << ' ' << v[1] << ' ' << v[2] << ' '
|
||||
<< v[3] << ' ' << v[4] << ' ' << v[5] << ' '
|
||||
<< v[6] << ' ' << v[7] << ' ' << v[8] << nl;
|
||||
}
|
||||
}
|
||||
@ -266,8 +264,8 @@ void Foam::rawSurfaceWriter<Type>::writeData
|
||||
writeGeometry(points, faces, elemI, os);
|
||||
|
||||
const tensor& v = values[elemI];
|
||||
os << v[0] << ' ' << v[1] << ' ' << v[2]
|
||||
<< v[3] << ' ' << v[4] << ' ' << v[5]
|
||||
os << v[0] << ' ' << v[1] << ' ' << v[2] << ' '
|
||||
<< v[3] << ' ' << v[4] << ' ' << v[5] << ' '
|
||||
<< v[6] << ' ' << v[7] << ' ' << v[8] << nl;
|
||||
}
|
||||
}
|
||||
|
@ -48,5 +48,9 @@ PISO
|
||||
nNonOrthogonalCorrectors 0;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
"(Xi|Su)" 1;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -22,21 +22,6 @@ FoamFile
|
||||
// is done for all coupled faces, not just for any patches created.
|
||||
// - optional: synchronise points on coupled patches.
|
||||
|
||||
// 1. Create cyclic:
|
||||
// - specify where the faces should come from
|
||||
// - specify the type of cyclic. If a rotational specify the rotationAxis
|
||||
// and centre to make matching easier
|
||||
// - pointSync true to guarantee points to line up.
|
||||
|
||||
// 2. Correct incorrect cyclic:
|
||||
// This will usually fail upon loading:
|
||||
// "face 0 area does not match neighbour 2 by 0.0100005%"
|
||||
// " -- possible face ordering problem."
|
||||
// - change patch type from 'cyclic' to 'patch' in the polyMesh/boundary file.
|
||||
// - loosen match tolerance to get case to load
|
||||
// - regenerate cyclic as above
|
||||
|
||||
|
||||
// Tolerance used in matching faces. Absolute tolerance is span of
|
||||
// face times this factor. To load incorrectly matches meshes set this
|
||||
// to a higher value.
|
||||
@ -46,24 +31,16 @@ matchTolerance 1E-3;
|
||||
pointSync true;
|
||||
|
||||
// Patches to create.
|
||||
patchInfo
|
||||
patches
|
||||
(
|
||||
{
|
||||
// Name of new patch
|
||||
name inlet;
|
||||
|
||||
// Type of new patch
|
||||
dictionary
|
||||
patchInfo
|
||||
{
|
||||
type patch;
|
||||
|
||||
// Optional: explicitly set transformation tensor.
|
||||
// Used when matching and synchronising points.
|
||||
//transform translational;
|
||||
//separationVector (-2289 0 0);
|
||||
transform rotational;
|
||||
rotationAxis (1 0 0);
|
||||
rotationCentre (0 0 0);
|
||||
}
|
||||
|
||||
// How to construct: either from 'patches' or 'set'
|
||||
|
Loading…
Reference in New Issue
Block a user