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:
@ -195,9 +195,10 @@ done
|
|||||||
# done
|
# done
|
||||||
|
|
||||||
|
|
||||||
# Save the essential bits of information:
|
# Save the essential bits of information
|
||||||
|
# silently remove leading ~OpenFOAM/ (used in Foam::findEtcFile)
|
||||||
nArgs=$#
|
nArgs=$#
|
||||||
fileName="$1"
|
fileName="${1#~OpenFOAM/}"
|
||||||
|
|
||||||
# Define the various places to be searched:
|
# Define the various places to be searched:
|
||||||
unset dirList
|
unset dirList
|
||||||
|
|||||||
222
bin/tools/pre-commit-hook
Executable file
222
bin/tools/pre-commit-hook
Executable file
@ -0,0 +1,222 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#---------------------------------*- sh -*-------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | Copyright (C) 2010-2010 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/>.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# pre-commit-hook
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# pre-commit hook for git.
|
||||||
|
# Copy or link this file as ".git/hooks/pre-commit"
|
||||||
|
#
|
||||||
|
# Eg,
|
||||||
|
# (
|
||||||
|
# cd $WM_PROJECT_DIR/.git/hooks &&
|
||||||
|
# ln -sf ../../bin/tools/pre-commit-hook pre-commit
|
||||||
|
# )
|
||||||
|
#
|
||||||
|
# Hook receives: empty
|
||||||
|
#
|
||||||
|
# Checks for
|
||||||
|
# - illegal code, e.g. <TAB>
|
||||||
|
# - copyright is current, e.g. if present, contains XXX-<current-year>
|
||||||
|
# - columns greater than 80 for *.[CH] files
|
||||||
|
#
|
||||||
|
# Note
|
||||||
|
# Using "git commit --no-verify" it is possible to override the hook.
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
die()
|
||||||
|
{
|
||||||
|
echo 'pre-commit hook failure' 1>&2
|
||||||
|
echo '-----------------------' 1>&2
|
||||||
|
echo '' 1>&2
|
||||||
|
echo "$@" 1>&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
# Check content that will be added by this commit.
|
||||||
|
|
||||||
|
if git rev-parse --verify -q HEAD > /dev/null
|
||||||
|
then
|
||||||
|
against=HEAD
|
||||||
|
else
|
||||||
|
# Initial commit: diff against an empty tree object
|
||||||
|
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
|
||||||
|
fi
|
||||||
|
|
||||||
|
# list of all files
|
||||||
|
fileList=$(git diff-index --name-only $against --)
|
||||||
|
unset badFiles
|
||||||
|
|
||||||
|
# join list of files with this amount of space
|
||||||
|
Indent=" "
|
||||||
|
|
||||||
|
#
|
||||||
|
# report bad files and die if there are any
|
||||||
|
#
|
||||||
|
dieOnBadFiles()
|
||||||
|
{
|
||||||
|
if [ -n "$badFiles" ]
|
||||||
|
then
|
||||||
|
echo 'pre-commit hook failure' 1>&2
|
||||||
|
echo '-----------------------' 1>&2
|
||||||
|
echo "$@" 1>&2
|
||||||
|
echo '' 1>&2
|
||||||
|
echo "File(s):" 1>&2
|
||||||
|
echo "$badFiles" 1>&2
|
||||||
|
echo '' 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# check for bad strings, characters, etc
|
||||||
|
#
|
||||||
|
checkIllegalCode()
|
||||||
|
{
|
||||||
|
reBad="(N""abla|"$'\t'")"
|
||||||
|
msgBad="N""abla or <TAB>"
|
||||||
|
|
||||||
|
badFiles=$(
|
||||||
|
for f in $fileList
|
||||||
|
do
|
||||||
|
# parse line numbers from this:
|
||||||
|
# path/fileName:<lineNr>: contents
|
||||||
|
lines=$(git grep --cached -n -E -e "$reBad" -- "$f" |
|
||||||
|
sed -e 's@^[^:]*:\([0-9]*\):.*@\1@' |
|
||||||
|
tr '\n' ' '
|
||||||
|
)
|
||||||
|
[ -n "$lines" ] && echo "$Indent$f -- lines: $lines"
|
||||||
|
done
|
||||||
|
)
|
||||||
|
|
||||||
|
dieOnBadFiles "Remove/correct bad '$msgBad' references"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# check that OpenCFD copyright is current
|
||||||
|
#
|
||||||
|
checkCopyright()
|
||||||
|
{
|
||||||
|
year=$(date +%Y)
|
||||||
|
|
||||||
|
badFiles=$(
|
||||||
|
for f in $fileList
|
||||||
|
do
|
||||||
|
# parse line numbers from this:
|
||||||
|
# path/fileName:<lineNr>: contents
|
||||||
|
# for Copyright lines without the current year
|
||||||
|
lines=$(git grep --cached -n -e Copyright -- "$f" |
|
||||||
|
sed -n \
|
||||||
|
-e '/OpenCFD/{ ' \
|
||||||
|
-e "/$year/b" \
|
||||||
|
-e 's@^[^:]*:\([0-9]*\):.*@\1@p }' |
|
||||||
|
tr '\n' ' '
|
||||||
|
)
|
||||||
|
[ -n "$lines" ] && echo "$Indent$f -- lines: $lines"
|
||||||
|
done
|
||||||
|
)
|
||||||
|
|
||||||
|
dieOnBadFiles "Update copyright year, e.g. XXXX-$year"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# limit line length to 80-columns
|
||||||
|
#
|
||||||
|
checkLineLength()
|
||||||
|
{
|
||||||
|
badFiles=$(
|
||||||
|
for f in $fileList
|
||||||
|
do
|
||||||
|
# limit to *.[CH] files
|
||||||
|
case "$f" in
|
||||||
|
(*.[CH])
|
||||||
|
# parse line numbers from this:
|
||||||
|
# path/fileName:<lineNr>: contents
|
||||||
|
lines=$(git grep --cached -n -e ".\{81,\}" -- "$f" |
|
||||||
|
sed -e 's@^[^:]*:\([0-9]*\):.*@\1@' |
|
||||||
|
tr '\n' ' '
|
||||||
|
)
|
||||||
|
[ -n "$lines" ] && echo "$Indent$f -- lines: $lines"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
)
|
||||||
|
|
||||||
|
dieOnBadFiles "Limit code to 80 columns before pushing"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# limit line length to 80-columns, except C++ comment lines
|
||||||
|
#
|
||||||
|
checkLineLengthNonComments()
|
||||||
|
{
|
||||||
|
badFiles=$(
|
||||||
|
for f in $fileList
|
||||||
|
do
|
||||||
|
# limit to *.[CH] files
|
||||||
|
case "$f" in
|
||||||
|
(*.[CH])
|
||||||
|
# parse line numbers from this (strip comment lines):
|
||||||
|
# path/fileName:<lineNr>: contents
|
||||||
|
lines=$(git grep --cached -n -e ".\{81,\}" -- "$f" |
|
||||||
|
sed -n \
|
||||||
|
-e '\@^[^:]*:[^:]*: *//.*@b' \
|
||||||
|
-e 's@^[^:]*:\([0-9]*\):.*@\1@p' |
|
||||||
|
tr '\n' ' '
|
||||||
|
)
|
||||||
|
[ -n "$lines" ] && echo "$Indent$f -- lines: $lines"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
)
|
||||||
|
|
||||||
|
dieOnBadFiles "Limit code to 80 columns before pushing"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# do all checks
|
||||||
|
# ~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
# builtin whitespace check to avoid trailing space, including CR-LF endings
|
||||||
|
bad=$(git diff-index --cached --check $against --) || die "$bad"
|
||||||
|
|
||||||
|
# check for illegal code, e.g. <TAB>, etc
|
||||||
|
checkIllegalCode
|
||||||
|
|
||||||
|
# ensure OpenCFD copyright contains correct year
|
||||||
|
checkCopyright
|
||||||
|
|
||||||
|
# ensure code conforms to 80 columns max
|
||||||
|
checkLineLength
|
||||||
|
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
@ -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) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -155,7 +155,7 @@ dimensionedScalar cbrt(const dimensionedScalar& ds)
|
|||||||
return dimensionedScalar
|
return dimensionedScalar
|
||||||
(
|
(
|
||||||
"cbrt(" + ds.name() + ')',
|
"cbrt(" + ds.name() + ')',
|
||||||
pow(ds.dimensions(), dimensionedScalar("(1/3)", dimless, 1.0/3.0)),
|
pow(ds.dimensions(), dimensionedScalar("(1|3)", dimless, 1.0/3.0)),
|
||||||
::cbrt(ds.value())
|
::cbrt(ds.value())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -27,6 +27,7 @@ License
|
|||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
#include "fvMatrices.H"
|
#include "fvMatrices.H"
|
||||||
#include "geometricOneField.H"
|
#include "geometricOneField.H"
|
||||||
|
#include "stringListOps.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -62,15 +63,15 @@ void Foam::porousZone::adjustNegativeResistance(dimensionedVector& resist)
|
|||||||
|
|
||||||
Foam::porousZone::porousZone
|
Foam::porousZone::porousZone
|
||||||
(
|
(
|
||||||
const word& name,
|
const keyType& key,
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
name_(name),
|
key_(key),
|
||||||
mesh_(mesh),
|
mesh_(mesh),
|
||||||
dict_(dict),
|
dict_(dict),
|
||||||
cellZoneID_(mesh_.cellZones().findZoneID(name)),
|
cellZoneIds_(0),
|
||||||
coordSys_(dict, mesh),
|
coordSys_(dict, mesh),
|
||||||
porosity_(1),
|
porosity_(1),
|
||||||
intensity_(0),
|
intensity_(0),
|
||||||
@ -80,9 +81,27 @@ Foam::porousZone::porousZone
|
|||||||
D_("D", dimensionSet(0, -2, 0, 0, 0), tensor::zero),
|
D_("D", dimensionSet(0, -2, 0, 0, 0), tensor::zero),
|
||||||
F_("F", dimensionSet(0, -1, 0, 0, 0), tensor::zero)
|
F_("F", dimensionSet(0, -1, 0, 0, 0), tensor::zero)
|
||||||
{
|
{
|
||||||
Info<< "Creating porous zone: " << name_ << endl;
|
Info<< "Creating porous zone: " << key_ << endl;
|
||||||
|
|
||||||
bool foundZone = (cellZoneID_ != -1);
|
if (key_.isPattern())
|
||||||
|
{
|
||||||
|
cellZoneIds_ = findStrings
|
||||||
|
(
|
||||||
|
key_,
|
||||||
|
mesh_.cellZones().names()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const label zoneId = mesh_.cellZones().findZoneID(key_);
|
||||||
|
if (zoneId != -1)
|
||||||
|
{
|
||||||
|
cellZoneIds_.setSize(1);
|
||||||
|
cellZoneIds_[0] = zoneId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool foundZone = !cellZoneIds_.empty();
|
||||||
reduce(foundZone, orOp<bool>());
|
reduce(foundZone, orOp<bool>());
|
||||||
|
|
||||||
if (!foundZone && Pstream::master())
|
if (!foundZone && Pstream::master())
|
||||||
@ -90,8 +109,8 @@ Foam::porousZone::porousZone
|
|||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"Foam::porousZone::porousZone"
|
"Foam::porousZone::porousZone"
|
||||||
"(const fvMesh&, const word&, const dictionary&)"
|
"(const keyType&, const fvMesh&, const dictionary&)"
|
||||||
) << "cannot find porous cellZone " << name_
|
) << "cannot find porous cellZone " << key_
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,7 +125,7 @@ Foam::porousZone::porousZone
|
|||||||
FatalIOErrorIn
|
FatalIOErrorIn
|
||||||
(
|
(
|
||||||
"Foam::porousZone::porousZone"
|
"Foam::porousZone::porousZone"
|
||||||
"(const fvMesh&, const word&, const dictionary&)",
|
"(const keyType&, const fvMesh&, const dictionary&)",
|
||||||
dict_
|
dict_
|
||||||
)
|
)
|
||||||
<< "out-of-range porosity value " << porosity_
|
<< "out-of-range porosity value " << porosity_
|
||||||
@ -123,7 +142,7 @@ Foam::porousZone::porousZone
|
|||||||
FatalIOErrorIn
|
FatalIOErrorIn
|
||||||
(
|
(
|
||||||
"Foam::porousZone::porousZone"
|
"Foam::porousZone::porousZone"
|
||||||
"(const fvMesh&, const word&, const dictionary&)",
|
"(const keyType&, const fvMesh&, const dictionary&)",
|
||||||
dict_
|
dict_
|
||||||
)
|
)
|
||||||
<< "out-of-range turbulent intensity value " << intensity_
|
<< "out-of-range turbulent intensity value " << intensity_
|
||||||
@ -140,7 +159,7 @@ Foam::porousZone::porousZone
|
|||||||
FatalIOErrorIn
|
FatalIOErrorIn
|
||||||
(
|
(
|
||||||
"Foam::porousZone::porousZone"
|
"Foam::porousZone::porousZone"
|
||||||
"(const fvMesh&, const word&, const dictionary&)",
|
"(const keyType&, const fvMesh&, const dictionary&)",
|
||||||
dict_
|
dict_
|
||||||
)
|
)
|
||||||
<< "out-of-range turbulent length scale " << mixingLength_
|
<< "out-of-range turbulent length scale " << mixingLength_
|
||||||
@ -169,7 +188,7 @@ Foam::porousZone::porousZone
|
|||||||
FatalIOErrorIn
|
FatalIOErrorIn
|
||||||
(
|
(
|
||||||
"Foam::porousZone::porousZone"
|
"Foam::porousZone::porousZone"
|
||||||
"(const fvMesh&, const word&, const dictionary&)",
|
"(const keyType&, const fvMesh&, const dictionary&)",
|
||||||
dict_
|
dict_
|
||||||
) << "incorrect dimensions for d: " << d.dimensions()
|
) << "incorrect dimensions for d: " << d.dimensions()
|
||||||
<< " should be " << D_.dimensions()
|
<< " should be " << D_.dimensions()
|
||||||
@ -192,7 +211,7 @@ Foam::porousZone::porousZone
|
|||||||
FatalIOErrorIn
|
FatalIOErrorIn
|
||||||
(
|
(
|
||||||
"Foam::porousZone::porousZone"
|
"Foam::porousZone::porousZone"
|
||||||
"(const fvMesh&, const word&, const dictionary&)",
|
"(const keyType&, const fvMesh&, const dictionary&)",
|
||||||
dict_
|
dict_
|
||||||
) << "incorrect dimensions for f: " << f.dimensions()
|
) << "incorrect dimensions for f: " << f.dimensions()
|
||||||
<< " should be " << F_.dimensions()
|
<< " should be " << F_.dimensions()
|
||||||
@ -220,7 +239,7 @@ Foam::porousZone::porousZone
|
|||||||
FatalIOErrorIn
|
FatalIOErrorIn
|
||||||
(
|
(
|
||||||
"Foam::porousZone::porousZone"
|
"Foam::porousZone::porousZone"
|
||||||
"(const fvMesh&, const word&, const dictionary&)",
|
"(const keyType&, const fvMesh&, const dictionary&)",
|
||||||
dict_
|
dict_
|
||||||
) << "neither powerLaw (C0/C1) "
|
) << "neither powerLaw (C0/C1) "
|
||||||
"nor Darcy-Forchheimer law (d/f) specified"
|
"nor Darcy-Forchheimer law (d/f) specified"
|
||||||
@ -239,7 +258,7 @@ Foam::porousZone::porousZone
|
|||||||
|
|
||||||
void Foam::porousZone::addResistance(fvVectorMatrix& UEqn) const
|
void Foam::porousZone::addResistance(fvVectorMatrix& UEqn) const
|
||||||
{
|
{
|
||||||
if (cellZoneID_ == -1)
|
if (cellZoneIds_.empty())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -250,7 +269,6 @@ void Foam::porousZone::addResistance(fvVectorMatrix& UEqn) const
|
|||||||
compressible = true;
|
compressible = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const labelList& cells = mesh_.cellZones()[cellZoneID_];
|
|
||||||
const scalarField& V = mesh_.V();
|
const scalarField& V = mesh_.V();
|
||||||
scalarField& Udiag = UEqn.diag();
|
scalarField& Udiag = UEqn.diag();
|
||||||
vectorField& Usource = UEqn.source();
|
vectorField& Usource = UEqn.source();
|
||||||
@ -263,7 +281,6 @@ void Foam::porousZone::addResistance(fvVectorMatrix& UEqn) const
|
|||||||
addPowerLawResistance
|
addPowerLawResistance
|
||||||
(
|
(
|
||||||
Udiag,
|
Udiag,
|
||||||
cells,
|
|
||||||
V,
|
V,
|
||||||
mesh_.lookupObject<volScalarField>("rho"),
|
mesh_.lookupObject<volScalarField>("rho"),
|
||||||
U
|
U
|
||||||
@ -274,7 +291,6 @@ void Foam::porousZone::addResistance(fvVectorMatrix& UEqn) const
|
|||||||
addPowerLawResistance
|
addPowerLawResistance
|
||||||
(
|
(
|
||||||
Udiag,
|
Udiag,
|
||||||
cells,
|
|
||||||
V,
|
V,
|
||||||
geometricOneField(),
|
geometricOneField(),
|
||||||
U
|
U
|
||||||
@ -293,7 +309,6 @@ void Foam::porousZone::addResistance(fvVectorMatrix& UEqn) const
|
|||||||
(
|
(
|
||||||
Udiag,
|
Udiag,
|
||||||
Usource,
|
Usource,
|
||||||
cells,
|
|
||||||
V,
|
V,
|
||||||
mesh_.lookupObject<volScalarField>("rho"),
|
mesh_.lookupObject<volScalarField>("rho"),
|
||||||
mesh_.lookupObject<volScalarField>("mu"),
|
mesh_.lookupObject<volScalarField>("mu"),
|
||||||
@ -306,7 +321,6 @@ void Foam::porousZone::addResistance(fvVectorMatrix& UEqn) const
|
|||||||
(
|
(
|
||||||
Udiag,
|
Udiag,
|
||||||
Usource,
|
Usource,
|
||||||
cells,
|
|
||||||
V,
|
V,
|
||||||
geometricOneField(),
|
geometricOneField(),
|
||||||
mesh_.lookupObject<volScalarField>("nu"),
|
mesh_.lookupObject<volScalarField>("nu"),
|
||||||
@ -324,7 +338,7 @@ void Foam::porousZone::addResistance
|
|||||||
bool correctAUprocBC
|
bool correctAUprocBC
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (cellZoneID_ == -1)
|
if (cellZoneIds_.empty())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -335,7 +349,6 @@ void Foam::porousZone::addResistance
|
|||||||
compressible = true;
|
compressible = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const labelList& cells = mesh_.cellZones()[cellZoneID_];
|
|
||||||
const vectorField& U = UEqn.psi();
|
const vectorField& U = UEqn.psi();
|
||||||
|
|
||||||
if (C0_ > VSMALL)
|
if (C0_ > VSMALL)
|
||||||
@ -345,7 +358,6 @@ void Foam::porousZone::addResistance
|
|||||||
addPowerLawResistance
|
addPowerLawResistance
|
||||||
(
|
(
|
||||||
AU,
|
AU,
|
||||||
cells,
|
|
||||||
mesh_.lookupObject<volScalarField>("rho"),
|
mesh_.lookupObject<volScalarField>("rho"),
|
||||||
U
|
U
|
||||||
);
|
);
|
||||||
@ -355,7 +367,6 @@ void Foam::porousZone::addResistance
|
|||||||
addPowerLawResistance
|
addPowerLawResistance
|
||||||
(
|
(
|
||||||
AU,
|
AU,
|
||||||
cells,
|
|
||||||
geometricOneField(),
|
geometricOneField(),
|
||||||
U
|
U
|
||||||
);
|
);
|
||||||
@ -372,7 +383,6 @@ void Foam::porousZone::addResistance
|
|||||||
addViscousInertialResistance
|
addViscousInertialResistance
|
||||||
(
|
(
|
||||||
AU,
|
AU,
|
||||||
cells,
|
|
||||||
mesh_.lookupObject<volScalarField>("rho"),
|
mesh_.lookupObject<volScalarField>("rho"),
|
||||||
mesh_.lookupObject<volScalarField>("mu"),
|
mesh_.lookupObject<volScalarField>("mu"),
|
||||||
U
|
U
|
||||||
@ -383,7 +393,6 @@ void Foam::porousZone::addResistance
|
|||||||
addViscousInertialResistance
|
addViscousInertialResistance
|
||||||
(
|
(
|
||||||
AU,
|
AU,
|
||||||
cells,
|
|
||||||
geometricOneField(),
|
geometricOneField(),
|
||||||
mesh_.lookupObject<volScalarField>("nu"),
|
mesh_.lookupObject<volScalarField>("nu"),
|
||||||
U
|
U
|
||||||
|
|||||||
@ -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) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -110,8 +110,8 @@ class porousZone
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Name of this zone
|
//- Name of this zone, or a regular expression
|
||||||
word name_;
|
keyType key_;
|
||||||
|
|
||||||
//- Reference to the finite volume mesh this zone is part of
|
//- Reference to the finite volume mesh this zone is part of
|
||||||
const fvMesh& mesh_;
|
const fvMesh& mesh_;
|
||||||
@ -119,8 +119,8 @@ class porousZone
|
|||||||
//- Dictionary containing the parameters
|
//- Dictionary containing the parameters
|
||||||
dictionary dict_;
|
dictionary dict_;
|
||||||
|
|
||||||
//- Cell zone ID
|
//- Cell zone Ids
|
||||||
label cellZoneID_;
|
labelList cellZoneIds_;
|
||||||
|
|
||||||
//- Coordinate system used for the zone (Cartesian)
|
//- Coordinate system used for the zone (Cartesian)
|
||||||
coordinateSystem coordSys_;
|
coordinateSystem coordSys_;
|
||||||
@ -159,7 +159,6 @@ class porousZone
|
|||||||
void addPowerLawResistance
|
void addPowerLawResistance
|
||||||
(
|
(
|
||||||
scalarField& Udiag,
|
scalarField& Udiag,
|
||||||
const labelList& cells,
|
|
||||||
const scalarField& V,
|
const scalarField& V,
|
||||||
const RhoFieldType& rho,
|
const RhoFieldType& rho,
|
||||||
const vectorField& U
|
const vectorField& U
|
||||||
@ -171,7 +170,6 @@ class porousZone
|
|||||||
(
|
(
|
||||||
scalarField& Udiag,
|
scalarField& Udiag,
|
||||||
vectorField& Usource,
|
vectorField& Usource,
|
||||||
const labelList& cells,
|
|
||||||
const scalarField& V,
|
const scalarField& V,
|
||||||
const RhoFieldType& rho,
|
const RhoFieldType& rho,
|
||||||
const scalarField& mu,
|
const scalarField& mu,
|
||||||
@ -184,7 +182,6 @@ class porousZone
|
|||||||
void addPowerLawResistance
|
void addPowerLawResistance
|
||||||
(
|
(
|
||||||
tensorField& AU,
|
tensorField& AU,
|
||||||
const labelList& cells,
|
|
||||||
const RhoFieldType& rho,
|
const RhoFieldType& rho,
|
||||||
const vectorField& U
|
const vectorField& U
|
||||||
) const;
|
) const;
|
||||||
@ -194,7 +191,6 @@ class porousZone
|
|||||||
void addViscousInertialResistance
|
void addViscousInertialResistance
|
||||||
(
|
(
|
||||||
tensorField& AU,
|
tensorField& AU,
|
||||||
const labelList& cells,
|
|
||||||
const RhoFieldType& rho,
|
const RhoFieldType& rho,
|
||||||
const scalarField& mu,
|
const scalarField& mu,
|
||||||
const vectorField& U
|
const vectorField& U
|
||||||
@ -213,7 +209,7 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
porousZone(const word& name, const fvMesh&, const dictionary&);
|
porousZone(const keyType& key, const fvMesh&, const dictionary&);
|
||||||
|
|
||||||
//- Return clone
|
//- Return clone
|
||||||
autoPtr<porousZone> clone() const
|
autoPtr<porousZone> clone() const
|
||||||
@ -237,10 +233,10 @@ public:
|
|||||||
|
|
||||||
autoPtr<porousZone> operator()(Istream& is) const
|
autoPtr<porousZone> operator()(Istream& is) const
|
||||||
{
|
{
|
||||||
word name(is);
|
keyType key(is);
|
||||||
dictionary dict(is);
|
dictionary dict(is);
|
||||||
|
|
||||||
return autoPtr<porousZone>(new porousZone(name, mesh_, dict));
|
return autoPtr<porousZone>(new porousZone(key, mesh_, dict));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -255,9 +251,9 @@ public:
|
|||||||
// Access
|
// Access
|
||||||
|
|
||||||
//- cellZone name
|
//- cellZone name
|
||||||
const word& zoneName() const
|
const keyType& zoneName() const
|
||||||
{
|
{
|
||||||
return name_;
|
return key_;
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return mesh
|
//- Return mesh
|
||||||
@ -266,10 +262,10 @@ public:
|
|||||||
return mesh_;
|
return mesh_;
|
||||||
}
|
}
|
||||||
|
|
||||||
//- cellZone number
|
//- cellZone numbers
|
||||||
label zoneId() const
|
const labelList& zoneIds() const
|
||||||
{
|
{
|
||||||
return cellZoneID_;
|
return cellZoneIds_;
|
||||||
}
|
}
|
||||||
|
|
||||||
//- dictionary values used for the porousZone
|
//- dictionary values used for the porousZone
|
||||||
|
|||||||
@ -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) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -33,12 +33,15 @@ void Foam::porousZone::modifyDdt(fvMatrix<Type>& m) const
|
|||||||
{
|
{
|
||||||
if (porosity_ < 1)
|
if (porosity_ < 1)
|
||||||
{
|
{
|
||||||
const labelList& cells = mesh_.cellZones()[cellZoneID_];
|
forAll(cellZoneIds_, zoneI)
|
||||||
|
|
||||||
forAll(cells, i)
|
|
||||||
{
|
{
|
||||||
m.diag()[cells[i]] *= porosity_;
|
const labelList& cells = mesh_.cellZones()[cellZoneIds_[zoneI]];
|
||||||
m.source()[cells[i]] *= porosity_;
|
|
||||||
|
forAll(cells, i)
|
||||||
|
{
|
||||||
|
m.diag()[cells[i]] *= porosity_;
|
||||||
|
m.source()[cells[i]] *= porosity_;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -48,7 +51,6 @@ template<class RhoFieldType>
|
|||||||
void Foam::porousZone::addPowerLawResistance
|
void Foam::porousZone::addPowerLawResistance
|
||||||
(
|
(
|
||||||
scalarField& Udiag,
|
scalarField& Udiag,
|
||||||
const labelList& cells,
|
|
||||||
const scalarField& V,
|
const scalarField& V,
|
||||||
const RhoFieldType& rho,
|
const RhoFieldType& rho,
|
||||||
const vectorField& U
|
const vectorField& U
|
||||||
@ -57,10 +59,15 @@ void Foam::porousZone::addPowerLawResistance
|
|||||||
const scalar C0 = C0_;
|
const scalar C0 = C0_;
|
||||||
const scalar C1m1b2 = (C1_ - 1.0)/2.0;
|
const scalar C1m1b2 = (C1_ - 1.0)/2.0;
|
||||||
|
|
||||||
forAll(cells, i)
|
forAll(cellZoneIds_, zoneI)
|
||||||
{
|
{
|
||||||
Udiag[cells[i]] +=
|
const labelList& cells = mesh_.cellZones()[cellZoneIds_[zoneI]];
|
||||||
|
|
||||||
|
forAll(cells, i)
|
||||||
|
{
|
||||||
|
Udiag[cells[i]] +=
|
||||||
V[cells[i]]*rho[cells[i]]*C0*pow(magSqr(U[cells[i]]), C1m1b2);
|
V[cells[i]]*rho[cells[i]]*C0*pow(magSqr(U[cells[i]]), C1m1b2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,7 +77,6 @@ void Foam::porousZone::addViscousInertialResistance
|
|||||||
(
|
(
|
||||||
scalarField& Udiag,
|
scalarField& Udiag,
|
||||||
vectorField& Usource,
|
vectorField& Usource,
|
||||||
const labelList& cells,
|
|
||||||
const scalarField& V,
|
const scalarField& V,
|
||||||
const RhoFieldType& rho,
|
const RhoFieldType& rho,
|
||||||
const scalarField& mu,
|
const scalarField& mu,
|
||||||
@ -80,14 +86,21 @@ void Foam::porousZone::addViscousInertialResistance
|
|||||||
const tensor& D = D_.value();
|
const tensor& D = D_.value();
|
||||||
const tensor& F = F_.value();
|
const tensor& F = F_.value();
|
||||||
|
|
||||||
forAll(cells, i)
|
forAll(cellZoneIds_, zoneI)
|
||||||
{
|
{
|
||||||
tensor dragCoeff = mu[cells[i]]*D + (rho[cells[i]]*mag(U[cells[i]]))*F;
|
const labelList& cells = mesh_.cellZones()[cellZoneIds_[zoneI]];
|
||||||
scalar isoDragCoeff = tr(dragCoeff);
|
|
||||||
|
|
||||||
Udiag[cells[i]] += V[cells[i]]*isoDragCoeff;
|
forAll(cells, i)
|
||||||
Usource[cells[i]] -=
|
{
|
||||||
V[cells[i]]*((dragCoeff - I*isoDragCoeff) & U[cells[i]]);
|
const tensor dragCoeff = mu[cells[i]]*D
|
||||||
|
+ (rho[cells[i]]*mag(U[cells[i]]))*F;
|
||||||
|
|
||||||
|
const scalar isoDragCoeff = tr(dragCoeff);
|
||||||
|
|
||||||
|
Udiag[cells[i]] += V[cells[i]]*isoDragCoeff;
|
||||||
|
Usource[cells[i]] -=
|
||||||
|
V[cells[i]]*((dragCoeff - I*isoDragCoeff) & U[cells[i]]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,7 +109,6 @@ template<class RhoFieldType>
|
|||||||
void Foam::porousZone::addPowerLawResistance
|
void Foam::porousZone::addPowerLawResistance
|
||||||
(
|
(
|
||||||
tensorField& AU,
|
tensorField& AU,
|
||||||
const labelList& cells,
|
|
||||||
const RhoFieldType& rho,
|
const RhoFieldType& rho,
|
||||||
const vectorField& U
|
const vectorField& U
|
||||||
) const
|
) const
|
||||||
@ -104,10 +116,15 @@ void Foam::porousZone::addPowerLawResistance
|
|||||||
const scalar C0 = C0_;
|
const scalar C0 = C0_;
|
||||||
const scalar C1m1b2 = (C1_ - 1.0)/2.0;
|
const scalar C1m1b2 = (C1_ - 1.0)/2.0;
|
||||||
|
|
||||||
forAll(cells, i)
|
forAll(cellZoneIds_, zoneI)
|
||||||
{
|
{
|
||||||
AU[cells[i]] = AU[cells[i]]
|
const labelList& cells = mesh_.cellZones()[cellZoneIds_[zoneI]];
|
||||||
+ I*(rho[cells[i]]*C0*pow(magSqr(U[cells[i]]), C1m1b2));
|
|
||||||
|
forAll(cells, i)
|
||||||
|
{
|
||||||
|
AU[cells[i]] = AU[cells[i]]
|
||||||
|
+ I*(rho[cells[i]]*C0*pow(magSqr(U[cells[i]]), C1m1b2));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,7 +133,6 @@ template<class RhoFieldType>
|
|||||||
void Foam::porousZone::addViscousInertialResistance
|
void Foam::porousZone::addViscousInertialResistance
|
||||||
(
|
(
|
||||||
tensorField& AU,
|
tensorField& AU,
|
||||||
const labelList& cells,
|
|
||||||
const RhoFieldType& rho,
|
const RhoFieldType& rho,
|
||||||
const scalarField& mu,
|
const scalarField& mu,
|
||||||
const vectorField& U
|
const vectorField& U
|
||||||
@ -125,9 +141,14 @@ void Foam::porousZone::addViscousInertialResistance
|
|||||||
const tensor& D = D_.value();
|
const tensor& D = D_.value();
|
||||||
const tensor& F = F_.value();
|
const tensor& F = F_.value();
|
||||||
|
|
||||||
forAll(cells, i)
|
forAll(cellZoneIds_, zoneI)
|
||||||
{
|
{
|
||||||
AU[cells[i]] += mu[cells[i]]*D + (rho[cells[i]]*mag(U[cells[i]]))*F;
|
const labelList& cells = mesh_.cellZones()[cellZoneIds_[zoneI]];
|
||||||
|
|
||||||
|
forAll(cells, i)
|
||||||
|
{
|
||||||
|
AU[cells[i]] += mu[cells[i]]*D + (rho[cells[i]]*mag(U[cells[i]]))*F;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,74 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 1991-2010 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 "error.H"
|
|
||||||
#include "atomizationModel.H"
|
|
||||||
#include "LISA.H"
|
|
||||||
#include "noAtomization.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
autoPtr<atomizationModel> atomizationModel::New
|
|
||||||
(
|
|
||||||
const dictionary& dict,
|
|
||||||
spray& sm
|
|
||||||
)
|
|
||||||
{
|
|
||||||
word atomizationModelType
|
|
||||||
(
|
|
||||||
dict.lookup("atomizationModel")
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "Selecting atomizationModel "
|
|
||||||
<< atomizationModelType << endl;
|
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
|
||||||
dictionaryConstructorTablePtr_->find(atomizationModelType);
|
|
||||||
|
|
||||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
|
||||||
{
|
|
||||||
FatalError
|
|
||||||
<< "atomizationModel::New(const dictionary&, const spray&) : " << endl
|
|
||||||
<< " unknown atomizationModelType type "
|
|
||||||
<< atomizationModelType
|
|
||||||
<< ", constructor not in hash table" << endl << endl
|
|
||||||
<< " Valid atomizationModel types are :" << endl;
|
|
||||||
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError);
|
|
||||||
}
|
|
||||||
|
|
||||||
return autoPtr<atomizationModel>(cstrIter()(dict, sm));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -59,6 +59,6 @@ Foam::CollisionModel<CloudType>::~CollisionModel()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "NewCollisionModel.C"
|
#include "CollisionModelNew.C"
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -29,7 +29,7 @@ Description
|
|||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
CollisionModel.C
|
CollisionModel.C
|
||||||
NewCollisionModel.C
|
CollisionModelNew.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|||||||
@ -75,6 +75,6 @@ Foam::PairModel<CloudType>::coeffDict() const
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "NewPairModel.C"
|
#include "PairModelNew.C"
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -29,7 +29,7 @@ Description
|
|||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
PairModel.C
|
PairModel.C
|
||||||
NewPairModel.C
|
PairModelNew.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|||||||
@ -83,6 +83,6 @@ Foam::WallModel<CloudType>::coeffDict() const
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "NewWallModel.C"
|
#include "WallModelNew.C"
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -29,7 +29,7 @@ Description
|
|||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
WallModel.C
|
WallModel.C
|
||||||
NewWallModel.C
|
WallModelNew.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|||||||
@ -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) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -136,37 +136,36 @@ Foam::coordinateSystem::coordinateSystem
|
|||||||
{
|
{
|
||||||
const entry* entryPtr = dict.lookupEntryPtr(typeName_(), false, false);
|
const entry* entryPtr = dict.lookupEntryPtr(typeName_(), false, false);
|
||||||
|
|
||||||
// a simple entry is a lookup into global coordinateSystems
|
// non-dictionary entry is a lookup into global coordinateSystems
|
||||||
if (entryPtr && !entryPtr->isDict())
|
if (entryPtr && !entryPtr->isDict())
|
||||||
{
|
{
|
||||||
word csName;
|
keyType key(entryPtr->stream());
|
||||||
entryPtr->stream() >> csName;
|
|
||||||
|
|
||||||
const coordinateSystems& csLst = coordinateSystems::New(obr);
|
const coordinateSystems& lst = coordinateSystems::New(obr);
|
||||||
|
const label id = lst.find(key);
|
||||||
|
|
||||||
label csId = csLst.find(csName);
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "coordinateSystem::coordinateSystem"
|
Info<< "coordinateSystem::coordinateSystem"
|
||||||
"(const dictionary&, const objectRegistry&):"
|
"(const dictionary&, const objectRegistry&):"
|
||||||
<< nl << "using global coordinate system: "
|
<< nl << "using global coordinate system: "
|
||||||
<< csName << "=" << csId << endl;
|
<< key << "=" << id << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (csId < 0)
|
if (id < 0)
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"coordinateSystem::coordinateSystem"
|
"coordinateSystem::coordinateSystem"
|
||||||
"(const dictionary&, const objectRegistry&)"
|
"(const dictionary&, const objectRegistry&)"
|
||||||
) << "could not find coordinate system: " << csName << nl
|
) << "could not find coordinate system: " << key << nl
|
||||||
<< "available coordinate systems: " << csLst.toc() << nl << nl
|
<< "available coordinate systems: " << lst.toc() << nl << nl
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
// copy coordinateSystem, but assign the name as the typeName
|
// copy coordinateSystem, but assign the name as the typeName
|
||||||
// to avoid strange things in writeDict()
|
// to avoid strange things in writeDict()
|
||||||
operator=(csLst[csId]);
|
operator=(lst[id]);
|
||||||
name_ = typeName_();
|
name_ = typeName_();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -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) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|||||||
@ -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) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -26,6 +26,7 @@ License
|
|||||||
#include "coordinateSystems.H"
|
#include "coordinateSystems.H"
|
||||||
#include "IOPtrList.H"
|
#include "IOPtrList.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
|
#include "stringListOps.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -97,13 +98,25 @@ const Foam::coordinateSystems& Foam::coordinateSystems::New
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::label Foam::coordinateSystems::find(const word& keyword) const
|
Foam::label Foam::coordinateSystems::find(const keyType& key) const
|
||||||
{
|
{
|
||||||
forAll(*this, i)
|
if (key.isPattern())
|
||||||
{
|
{
|
||||||
if (keyword == operator[](i).name())
|
labelList allFound = findAll(key);
|
||||||
|
// return first element
|
||||||
|
if (!allFound.empty())
|
||||||
{
|
{
|
||||||
return i;
|
return allFound[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
forAll(*this, i)
|
||||||
|
{
|
||||||
|
if (key == operator[](i).name())
|
||||||
|
{
|
||||||
|
return i;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,9 +124,34 @@ Foam::label Foam::coordinateSystems::find(const word& keyword) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Foam::coordinateSystems::found(const word& keyword) const
|
Foam::labelList Foam::coordinateSystems::findAll(const keyType& key) const
|
||||||
{
|
{
|
||||||
return find(keyword) >= 0;
|
labelList allFound;
|
||||||
|
if (key.isPattern())
|
||||||
|
{
|
||||||
|
allFound = findStrings(key, toc());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
allFound.setSize(size());
|
||||||
|
label nFound = 0;
|
||||||
|
forAll(*this, i)
|
||||||
|
{
|
||||||
|
if (key == operator[](i).name())
|
||||||
|
{
|
||||||
|
allFound[nFound++] = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
allFound.setSize(nFound);
|
||||||
|
}
|
||||||
|
|
||||||
|
return allFound;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Foam::coordinateSystems::found(const keyType& key) const
|
||||||
|
{
|
||||||
|
return find(key) >= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -97,11 +97,14 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
//- Find and return index for a given keyword, returns -1 if not found
|
//- Find and return index for the first match, returns -1 if not found
|
||||||
label find(const word& key) const;
|
label find(const keyType& key) const;
|
||||||
|
|
||||||
//- Search for given keyword
|
//- Find and return indices for all matches
|
||||||
bool found(const word& keyword) const;
|
labelList findAll(const keyType& key) const;
|
||||||
|
|
||||||
|
//- Search for given key
|
||||||
|
bool found(const keyType& key) const;
|
||||||
|
|
||||||
//- Return the table of contents (list of all keywords)
|
//- Return the table of contents (list of all keywords)
|
||||||
wordList toc() const;
|
wordList toc() const;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
constSolidThermo/constSolidThermo.C
|
constSolidThermo/constSolidThermo.C
|
||||||
directionalSolidThermo/directionalSolidThermo.C
|
directionalSolidThermo/directionalSolidThermo.C
|
||||||
basicSolidThermo/basicSolidThermo.C
|
basicSolidThermo/basicSolidThermo.C
|
||||||
basicSolidThermo/newBasicSolidThermo.C
|
basicSolidThermo/basicSolidThermoNew.C
|
||||||
interpolatedSolidThermo/interpolatedSolidThermo.C
|
interpolatedSolidThermo/interpolatedSolidThermo.C
|
||||||
|
|
||||||
LIB = $(FOAM_LIBBIN)/libbasicSolidThermo
|
LIB = $(FOAM_LIBBIN)/libbasicSolidThermo
|
||||||
|
|||||||
@ -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) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -32,12 +32,12 @@ License
|
|||||||
|
|
||||||
Foam::thermalPorousZone::thermalPorousZone
|
Foam::thermalPorousZone::thermalPorousZone
|
||||||
(
|
(
|
||||||
const word& name,
|
const keyType& key,
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
porousZone(name, mesh, dict),
|
porousZone(key, mesh, dict),
|
||||||
T_("T", dimTemperature, -GREAT)
|
T_("T", dimTemperature, -GREAT)
|
||||||
{
|
{
|
||||||
if (const dictionary* dictPtr = dict.subDictPtr("thermalModel"))
|
if (const dictionary* dictPtr = dict.subDictPtr("thermalModel"))
|
||||||
@ -53,11 +53,7 @@ Foam::thermalPorousZone::thermalPorousZone
|
|||||||
FatalIOErrorIn
|
FatalIOErrorIn
|
||||||
(
|
(
|
||||||
"thermalPorousZone::thermalPorousZone"
|
"thermalPorousZone::thermalPorousZone"
|
||||||
"("
|
"(const keyType&, const fvMesh&, const dictionary&)",
|
||||||
"const word& name, "
|
|
||||||
"const fvMesh& mesh, "
|
|
||||||
"const dictionary& dict"
|
|
||||||
")",
|
|
||||||
*dictPtr
|
*dictPtr
|
||||||
) << "thermalModel " << thermalModel << " is not supported" << nl
|
) << "thermalModel " << thermalModel << " is not supported" << nl
|
||||||
<< " Supported thermalModels are: fixedTemperature"
|
<< " Supported thermalModels are: fixedTemperature"
|
||||||
@ -76,23 +72,28 @@ void Foam::thermalPorousZone::addEnthalpySource
|
|||||||
fvScalarMatrix& hEqn
|
fvScalarMatrix& hEqn
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (zoneId() == -1 || T_.value() < 0.0)
|
const labelList& zones = this->zoneIds();
|
||||||
|
if (zones.empty() || T_.value() < 0.0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const labelList& cells = mesh().cellZones()[zoneId()];
|
|
||||||
const scalarField& V = mesh().V();
|
const scalarField& V = mesh().V();
|
||||||
scalarField& hDiag = hEqn.diag();
|
scalarField& hDiag = hEqn.diag();
|
||||||
scalarField& hSource = hEqn.source();
|
scalarField& hSource = hEqn.source();
|
||||||
|
|
||||||
scalarField hZone = thermo.h(scalarField(cells.size(), T_.value()), cells);
|
// TODO: generalize for non-fixedTemperature methods
|
||||||
scalar rate = 1e6;
|
const scalar rate = 1e6;
|
||||||
|
|
||||||
forAll(cells, i)
|
forAll(zones, zoneI)
|
||||||
{
|
{
|
||||||
hDiag[cells[i]] += rate*V[cells[i]]*rho[cells[i]];
|
const labelList& cells = mesh().cellZones()[zones[zoneI]];
|
||||||
hSource[cells[i]] += rate*V[cells[i]]*rho[cells[i]]*hZone[i];
|
|
||||||
|
forAll(cells, i)
|
||||||
|
{
|
||||||
|
hDiag[cells[i]] += rate*V[cells[i]]*rho[cells[i]];
|
||||||
|
hSource[cells[i]] += rate*V[cells[i]]*rho[cells[i]]*T_.value();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -33,7 +33,6 @@ See Also
|
|||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
thermalPorousZone.C
|
thermalPorousZone.C
|
||||||
thermalPorousZoneTemplates.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -76,7 +75,7 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
thermalPorousZone(const word& name, const fvMesh&, const dictionary&);
|
thermalPorousZone(const keyType& key, const fvMesh&, const dictionary&);
|
||||||
|
|
||||||
//- Return clone
|
//- Return clone
|
||||||
autoPtr<thermalPorousZone> clone() const
|
autoPtr<thermalPorousZone> clone() const
|
||||||
@ -101,12 +100,12 @@ public:
|
|||||||
|
|
||||||
autoPtr<thermalPorousZone> operator()(Istream& is) const
|
autoPtr<thermalPorousZone> operator()(Istream& is) const
|
||||||
{
|
{
|
||||||
word name(is);
|
keyType key(is);
|
||||||
dictionary dict(is);
|
dictionary dict(is);
|
||||||
|
|
||||||
return autoPtr<thermalPorousZone>
|
return autoPtr<thermalPorousZone>
|
||||||
(
|
(
|
||||||
new thermalPorousZone(name, mesh_, dict)
|
new thermalPorousZone(key, mesh_, dict)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -149,12 +148,6 @@ public:
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#ifdef NoRepository
|
|
||||||
//# include "thermalPorousZoneTemplates.C"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -1,79 +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 "porousZone.H"
|
|
||||||
#include "fvMesh.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class RhoFieldType>
|
|
||||||
void Foam::porousZone::addPowerLawResistance
|
|
||||||
(
|
|
||||||
scalarField& Udiag,
|
|
||||||
const labelList& cells,
|
|
||||||
const scalarField& V,
|
|
||||||
const RhoFieldType& rho,
|
|
||||||
const vectorField& U
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
const scalar C0 = C0_;
|
|
||||||
const scalar C1m1b2 = (C1_ - 1.0)/2.0;
|
|
||||||
|
|
||||||
forAll(cells, i)
|
|
||||||
{
|
|
||||||
Udiag[cells[i]] +=
|
|
||||||
V[cells[i]]*rho[cells[i]]*C0*pow(magSqr(U[cells[i]]), C1m1b2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class RhoFieldType>
|
|
||||||
void Foam::porousZone::addViscousInertialResistance
|
|
||||||
(
|
|
||||||
scalarField& Udiag,
|
|
||||||
vectorField& Usource,
|
|
||||||
const labelList& cells,
|
|
||||||
const scalarField& V,
|
|
||||||
const RhoFieldType& rho,
|
|
||||||
const scalarField& mu,
|
|
||||||
const vectorField& U
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
const tensor& D = D_.value();
|
|
||||||
const tensor& F = F_.value();
|
|
||||||
|
|
||||||
forAll(cells, i)
|
|
||||||
{
|
|
||||||
tensor dragCoeff = mu[cells[i]]*D + (rho[cells[i]]*mag(U[cells[i]]))*F;
|
|
||||||
scalar isoDragCoeff = tr(dragCoeff);
|
|
||||||
|
|
||||||
Udiag[cells[i]] += V[cells[i]]*isoDragCoeff;
|
|
||||||
Usource[cells[i]] -=
|
|
||||||
V[cells[i]]*((dragCoeff - I*isoDragCoeff) & U[cells[i]]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -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) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|||||||
@ -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) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -46,7 +46,11 @@ Description
|
|||||||
d d [0 -2 0 0 0] (-1000 -1000 0.50753e+08);
|
d d [0 -2 0 0 0] (-1000 -1000 0.50753e+08);
|
||||||
f f [0 -1 0 0 0] (-1000 -1000 12.83);
|
f f [0 -1 0 0 0] (-1000 -1000 12.83);
|
||||||
}
|
}
|
||||||
Temperature [0 0 1 0 0] 600;
|
thermalModel
|
||||||
|
{
|
||||||
|
type fixedTemperature;
|
||||||
|
T T [0 0 1 0 0] 600;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@endverbatim
|
@endverbatim
|
||||||
@ -69,7 +73,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class thermalPorousZones Declaration
|
Class thermalPorousZones Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class thermalPorousZones
|
class thermalPorousZones
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
CPP = cpp -traditional-cpp $(GFLAGS)
|
||||||
LD = ld -A64
|
LD = ld -A64
|
||||||
|
|
||||||
PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl
|
PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
CPP = cpp -traditional-cpp $(GFLAGS)
|
||||||
|
|
||||||
PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl
|
PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl
|
||||||
|
|
||||||
include $(GENERAL_RULES)/standard
|
include $(GENERAL_RULES)/standard
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
CPP = cpp -traditional-cpp $(GFLAGS)
|
||||||
|
|
||||||
PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl
|
PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl
|
||||||
|
|
||||||
include $(GENERAL_RULES)/standard
|
include $(GENERAL_RULES)/standard
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
CPP = cpp -traditional-cpp $(GFLAGS)
|
||||||
|
|
||||||
PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl
|
PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl
|
||||||
|
|
||||||
include $(GENERAL_RULES)/standard
|
include $(GENERAL_RULES)/standard
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
# need single-line output from cpp
|
|
||||||
CPP = cpp -traditional-cpp
|
CPP = cpp -traditional-cpp
|
||||||
|
|
||||||
PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl
|
PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
CPP = /lib/cpp -traditional-cpp $(GFLAGS)
|
||||||
|
|
||||||
PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl
|
PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl
|
||||||
|
|
||||||
include $(GENERAL_RULES)/standard
|
include $(GENERAL_RULES)/standard
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
CPP = cpp -traditional-cpp $(GFLAGS)
|
||||||
LD = ld -melf_i386
|
LD = ld -melf_i386
|
||||||
|
|
||||||
PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl
|
PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
CPP = cpp -traditional-cpp $(GFLAGS)
|
||||||
LD = ld -melf_i386
|
LD = ld -melf_i386
|
||||||
|
|
||||||
PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl
|
PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
CPP = cpp -traditional-cpp $(GFLAGS)
|
||||||
LD = ld -melf_i386
|
LD = ld -melf_i386
|
||||||
|
|
||||||
PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl
|
PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
# need single-line output from cpp
|
|
||||||
CPP = cpp -traditional-cpp
|
CPP = cpp -traditional-cpp
|
||||||
LD = ld -melf_i386
|
LD = ld -melf_i386
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
CPP = cpp -traditional-cpp $(GFLAGS)
|
||||||
PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl
|
PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl
|
||||||
|
|
||||||
include $(GENERAL_RULES)/standard
|
include $(GENERAL_RULES)/standard
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
CPP = cpp -DICC_IA64_PREFETCH
|
CPP = /lib/cpp -traditional-cpp $(GFLAGS) -DICC_IA64_PREFETCH
|
||||||
|
|
||||||
GLIBS = -liberty
|
GLIBS = -liberty
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
CPP = /lib/cpp -traditional-cpp $(GFLAGS)
|
||||||
LD = ld -melf_i386
|
LD = ld -melf_i386
|
||||||
|
|
||||||
PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl
|
PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
CPP = cpp -traditional-cpp $(GFLAGS)
|
||||||
LD = ld -m elf64ppc
|
LD = ld -m elf64ppc
|
||||||
|
|
||||||
PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl
|
PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl
|
||||||
|
|||||||
Reference in New Issue
Block a user