Merge remote-tracking branch 'origin/master' into develop

This commit is contained in:
Andrew Heather
2024-06-18 17:09:58 +01:00
5 changed files with 64 additions and 56 deletions

View File

@ -43,7 +43,7 @@ Type Foam::functionObjects::extractEulerianParticles::faceValue
{
label patchi = patchIDs_[localFacei];
label pFacei = patchFaceIDs_[localFacei];
if (patchi != 0)
if (patchi != -1)
{
return field.boundaryField()[patchi][pFacei];
}

View File

@ -302,7 +302,7 @@ void Foam::ThermoSurfaceFilm<CloudType>::cacheFilmFields
TFilmPatch_ = film.Tf().primitiveField();
// Direct copy (one-to-one mapping)
TFilmPatch_ = film.Cp().primitiveField();
CpFilmPatch_ = film.Cp().primitiveField();
}

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2021-2022 OpenCFD Ltd.
Copyright (C) 2021-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -70,7 +70,7 @@ static tmp<vectorField> getBoundedColours
const scalar boundMax
)
{
const label boundDelta = (boundMax - boundMin + ROOTVSMALL);
const scalar boundDelta = (boundMax - boundMin + ROOTVSMALL);
auto tresult = tmp<vectorField>::New(field.size());
auto& result = tresult.ref();
@ -167,7 +167,7 @@ Foam::scalarMinMax Foam::coordSetWriters::gltfWriter::getFieldLimits
{
const dictionary fieldDict = fieldInfoDict_.subOrEmptyDict(fieldName);
scalarMinMax limits;
scalarMinMax limits(-GREAT, GREAT);
fieldDict.readIfPresent("min", limits.min());
fieldDict.readIfPresent("max", limits.max());
@ -191,7 +191,7 @@ Foam::coordSetWriters::gltfWriter::getAlphaField
{
// Not specified
}
else if (!eptr->stream().peek().isString())
else if (!eptr->stream().peek().isWord())
{
// Value specified

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2021-2022 OpenCFD Ltd.
Copyright (C) 2021-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -44,9 +44,11 @@ Description
\verbatim
formatOptions
{
gltf
{
// Apply colours flag (yes | no ) [optional]
colours yes;
colour yes;
// List of options per field
fieldInfo
@ -66,15 +68,18 @@ Description
}
}
}
}
\verbatim
For particle tracks:
\verbatim
formatOptions
{
gltf
{
// Apply colours flag (yes | no) [optional]
colours yes;
colour yes;
// Animate tracks (yes | no) [optional]
animate yes;
@ -104,6 +109,7 @@ Description
alpha 0.5;
}
}
}
\endverbatim
Note

View File

@ -419,20 +419,22 @@ void Foam::incompressibleAdjointSolver::accumulateBCSensitivityIntegrand
{
fvPatchVectorField& Uab = UaBoundary[patchI];
if (isA<adjointVectorBoundaryCondition>(Uab))
{
tmp<tensorField> dxdbMult =
refCast<adjointVectorBoundaryCondition>(Uab).dxdbMult();
if (dxdbMult)
{
const fvPatch& patch = mesh_.boundary()[patchI];
tmp<vectorField> tnf = patch.nf();
const scalarField& magSf = patch.magSf();
tmp<vectorField> DvDbMult =
nuEffBoundary[patchI]*(Uab.snGrad() + (gradUabf[patchI] & tnf))
nuEffBoundary[patchI]
*(Uab.snGrad() + (gradUabf[patchI] & tnf))
// - (nf*pa.boundaryField()[patchI])
+ adjointTurbulence().adjointMomentumBCSource()[patchI];
bcDxDbMult()[patchI] +=
(
DvDbMult
& refCast<adjointVectorBoundaryCondition>(Uab).dxdbMult()
)*magSf*dt;
bcDxDbMult()[patchI] += (DvDbMult & dxdbMult())*magSf*dt;
}
}
}
}