mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Fixing externalWallHeatFluxTemperature mapping scalarFields.
Fixing humidityTemperatureCoupled problem in parallel Adding Allrun-parallel to externalSolarLoad and windshieldCondensation tutorials
This commit is contained in:
@ -31,11 +31,7 @@
|
|||||||
fvm::laplacian(rhorAUf, p_rgh) == fvc::div(phiHbyA)
|
fvm::laplacian(rhorAUf, p_rgh) == fvc::div(phiHbyA)
|
||||||
);
|
);
|
||||||
|
|
||||||
p_rghEqn.setReference
|
p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
|
||||||
(
|
|
||||||
pRefCell,
|
|
||||||
compressible ? getRefCellValue(p_rgh, pRefCell) : pRefValue
|
|
||||||
);
|
|
||||||
|
|
||||||
p_rghEqn.solve();
|
p_rghEqn.solve();
|
||||||
|
|
||||||
@ -76,8 +72,9 @@
|
|||||||
{
|
{
|
||||||
p += (initialMass - fvc::domainIntegrate(psi*p))
|
p += (initialMass - fvc::domainIntegrate(psi*p))
|
||||||
/fvc::domainIntegrate(psi);
|
/fvc::domainIntegrate(psi);
|
||||||
p_rgh = p - rho*gh;
|
|
||||||
}
|
}
|
||||||
|
p_rgh = p - rho*gh;
|
||||||
}
|
}
|
||||||
|
|
||||||
rho = thermo.rho();
|
rho = thermo.rho();
|
||||||
|
|||||||
@ -1,11 +1,4 @@
|
|||||||
{
|
{
|
||||||
/*
|
|
||||||
rho = thermo.rho();
|
|
||||||
rho = max(rho, rhoMin[i]);
|
|
||||||
rho = min(rho, rhoMax[i]);
|
|
||||||
rho.relax();
|
|
||||||
*/
|
|
||||||
|
|
||||||
volScalarField rAU("rAU", 1.0/UEqn.A());
|
volScalarField rAU("rAU", 1.0/UEqn.A());
|
||||||
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
|
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
|
||||||
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh));
|
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh));
|
||||||
@ -39,11 +32,7 @@
|
|||||||
fvm::laplacian(rhorAUf, p_rgh) == fvc::div(phiHbyA)
|
fvm::laplacian(rhorAUf, p_rgh) == fvc::div(phiHbyA)
|
||||||
);
|
);
|
||||||
|
|
||||||
p_rghEqn.setReference
|
p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
|
||||||
(
|
|
||||||
pRefCell,
|
|
||||||
compressible ? getRefCellValue(p_rgh, pRefCell) : pRefValue
|
|
||||||
);
|
|
||||||
|
|
||||||
p_rghEqn.solve();
|
p_rghEqn.solve();
|
||||||
|
|
||||||
@ -84,8 +73,8 @@
|
|||||||
{
|
{
|
||||||
p += (initialMass - fvc::domainIntegrate(psi*p))
|
p += (initialMass - fvc::domainIntegrate(psi*p))
|
||||||
/compressibility;
|
/compressibility;
|
||||||
p_rgh = p - rho*gh;
|
|
||||||
}
|
}
|
||||||
|
p_rgh = p - rho*gh;
|
||||||
}
|
}
|
||||||
|
|
||||||
rho = thermo.rho();
|
rho = thermo.rho();
|
||||||
|
|||||||
@ -3,7 +3,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) 2011-2017 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -185,39 +185,17 @@ externalWallHeatFluxTemperatureFvPatchScalarField
|
|||||||
temperatureCoupledBase(patch(), ptf),
|
temperatureCoupledBase(patch(), ptf),
|
||||||
mode_(ptf.mode_),
|
mode_(ptf.mode_),
|
||||||
Q_(ptf.Q_),
|
Q_(ptf.Q_),
|
||||||
|
q_(ptf.q_, mapper),
|
||||||
|
h_(ptf.h_, mapper),
|
||||||
|
Ta_(ptf.Ta_, mapper),
|
||||||
relaxation_(ptf.relaxation_),
|
relaxation_(ptf.relaxation_),
|
||||||
emissivity_(ptf.emissivity_),
|
emissivity_(ptf.emissivity_),
|
||||||
|
qrPrevious_(ptf.qrPrevious_, mapper),
|
||||||
qrRelaxation_(ptf.qrRelaxation_),
|
qrRelaxation_(ptf.qrRelaxation_),
|
||||||
qrName_(ptf.qrName_),
|
qrName_(ptf.qrName_),
|
||||||
thicknessLayers_(ptf.thicknessLayers_),
|
thicknessLayers_(ptf.thicknessLayers_),
|
||||||
kappaLayers_(ptf.kappaLayers_)
|
kappaLayers_(ptf.kappaLayers_)
|
||||||
{
|
{}
|
||||||
switch (mode_)
|
|
||||||
{
|
|
||||||
case fixedPower:
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case fixedHeatFlux:
|
|
||||||
{
|
|
||||||
q_.autoMap(mapper);
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case fixedHeatTransferCoeff:
|
|
||||||
{
|
|
||||||
h_.autoMap(mapper);
|
|
||||||
Ta_.autoMap(mapper);
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (qrName_ != "none")
|
|
||||||
{
|
|
||||||
qrPrevious_.autoMap(mapper);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::externalWallHeatFluxTemperatureFvPatchScalarField::
|
Foam::externalWallHeatFluxTemperatureFvPatchScalarField::
|
||||||
|
|||||||
@ -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) 2015-2016 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2015-2017 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -469,7 +469,7 @@ void Foam::humidityTemperatureCoupledMixedFvPatchScalarField::updateCoeffs()
|
|||||||
scalarField nrbDeltaCoeffs(nbrPatch.deltaCoeffs());
|
scalarField nrbDeltaCoeffs(nbrPatch.deltaCoeffs());
|
||||||
mpp.distribute(nrbDeltaCoeffs);
|
mpp.distribute(nrbDeltaCoeffs);
|
||||||
|
|
||||||
scalarField KDeltaNbr(nbrK*nrbDeltaCoeffs);
|
scalarField KDeltaNbr(nbrField.kappa(*this)*nbrPatch.deltaCoeffs());
|
||||||
mpp.distribute(KDeltaNbr);
|
mpp.distribute(KDeltaNbr);
|
||||||
|
|
||||||
myKDelta_ = K*patch().deltaCoeffs();
|
myKDelta_ = K*patch().deltaCoeffs();
|
||||||
@ -702,7 +702,6 @@ void Foam::humidityTemperatureCoupledMixedFvPatchScalarField::updateCoeffs()
|
|||||||
|
|
||||||
mixedFvPatchScalarField::updateCoeffs();
|
mixedFvPatchScalarField::updateCoeffs();
|
||||||
|
|
||||||
|
|
||||||
if (debug && fluid_)
|
if (debug && fluid_)
|
||||||
{
|
{
|
||||||
scalar Qdm = gSum(dm);
|
scalar Qdm = gSum(dm);
|
||||||
|
|||||||
@ -22,7 +22,8 @@ done
|
|||||||
# Generate view factors
|
# Generate view factors
|
||||||
for i in air
|
for i in air
|
||||||
do
|
do
|
||||||
runParallel -s $i -np 4 viewFactorsGen -region $i
|
runParallel -s $i -np 4 \
|
||||||
|
viewFactorsGen -region $i
|
||||||
done
|
done
|
||||||
|
|
||||||
# set the initial fields
|
# set the initial fields
|
||||||
|
|||||||
@ -0,0 +1,39 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd ${0%/*} || exit 1 # Run from this directory
|
||||||
|
|
||||||
|
# Source tutorial run functions
|
||||||
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||||
|
|
||||||
|
# create the underlying block mesh
|
||||||
|
runApplication blockMesh
|
||||||
|
|
||||||
|
# create the set for the obstacles
|
||||||
|
runApplication topoSet
|
||||||
|
|
||||||
|
# mesh processing to generate the inlet duct
|
||||||
|
runApplication subsetMesh c0 -patch walls -overwrite
|
||||||
|
|
||||||
|
# split into the cabin, ice and exterior regions
|
||||||
|
runApplication splitMeshRegions -cellZones -overwrite
|
||||||
|
|
||||||
|
# create register face and cell zones
|
||||||
|
rm log.topoSet
|
||||||
|
runApplication topoSet -region cabin -dict system/topoSetDictRegister
|
||||||
|
|
||||||
|
# set the initial fields
|
||||||
|
restore0Dir
|
||||||
|
|
||||||
|
# Decompose
|
||||||
|
runApplication decomposePar -allRegions -constant
|
||||||
|
|
||||||
|
runParallel $(getApplication)
|
||||||
|
|
||||||
|
# Reconstruct
|
||||||
|
runApplication reconstructPar -allRegions
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "creating files for paraview post-processing"
|
||||||
|
echo
|
||||||
|
paraFoam -touchAll
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: plus |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
note "mesh decomposition control dictionary";
|
||||||
|
location "system";
|
||||||
|
object decomposeParDict;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
numberOfSubdomains 4;
|
||||||
|
|
||||||
|
method scotch;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -35,7 +35,7 @@ writeControl adjustableRunTime;
|
|||||||
|
|
||||||
purgeWrite 0;
|
purgeWrite 0;
|
||||||
|
|
||||||
writeFormat binary;
|
writeFormat ascii;
|
||||||
|
|
||||||
writePrecision 10;
|
writePrecision 10;
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ runTimeModifiable true;
|
|||||||
|
|
||||||
adjustTimeStep yes;
|
adjustTimeStep yes;
|
||||||
|
|
||||||
maxDi 10;
|
maxDi 10e3;
|
||||||
|
|
||||||
functions
|
functions
|
||||||
{
|
{
|
||||||
|
|||||||
@ -0,0 +1,25 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: plus |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
note "mesh decomposition control dictionary";
|
||||||
|
location "system";
|
||||||
|
object decomposeParDict;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
numberOfSubdomains 4;
|
||||||
|
|
||||||
|
method scotch;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: plus |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
note "mesh decomposition control dictionary";
|
||||||
|
location "system";
|
||||||
|
object decomposeParDict;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
numberOfSubdomains 4;
|
||||||
|
|
||||||
|
method scotch;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
Reference in New Issue
Block a user