mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' into develop
This commit is contained in:
@ -3,6 +3,9 @@
|
|||||||
|
|
||||||
Before opening a new issue, make sure to search for keywords in the issues
|
Before opening a new issue, make sure to search for keywords in the issues
|
||||||
filtered by the "bug" label and check to see if it has already been reported
|
filtered by the "bug" label and check to see if it has already been reported
|
||||||
|
|
||||||
|
You can see how your report will be rendered on the platform by using the
|
||||||
|
"preview" tab above
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
@ -14,12 +17,10 @@
|
|||||||
|
|
||||||
<!-- Summarize the bug encountered concisely -->
|
<!-- Summarize the bug encountered concisely -->
|
||||||
|
|
||||||
|
|
||||||
### Steps to reproduce
|
### Steps to reproduce
|
||||||
|
|
||||||
<!-- How one can reproduce the issue - this is very important -->
|
<!-- How one can reproduce the issue - this is very important -->
|
||||||
|
|
||||||
|
|
||||||
### Example case
|
### Example case
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
@ -29,17 +30,14 @@
|
|||||||
whether the bug has been fixed in a more recent version
|
whether the bug has been fixed in a more recent version
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
||||||
### What is the current *bug* behaviour?
|
### What is the current *bug* behaviour?
|
||||||
|
|
||||||
<!-- What actually happens -->
|
<!-- What actually happens -->
|
||||||
|
|
||||||
|
|
||||||
### What is the expected *correct* behavior?
|
### What is the expected *correct* behavior?
|
||||||
|
|
||||||
<!-- What you should see instead -->
|
<!-- What you should see instead -->
|
||||||
|
|
||||||
|
|
||||||
### Relevant logs and/or images
|
### Relevant logs and/or images
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
@ -47,7 +45,6 @@
|
|||||||
output, logs, and code as it's very hard to read otherwise.
|
output, logs, and code as it's very hard to read otherwise.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
||||||
### Environment information
|
### Environment information
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
@ -57,15 +54,20 @@
|
|||||||
Hardware info : any info that may help?
|
Hardware info : any info that may help?
|
||||||
Compiler : gcc|intel|clang etc
|
Compiler : gcc|intel|clang etc
|
||||||
-->
|
-->
|
||||||
OpenFOAM version :
|
|
||||||
Operating system :
|
- OpenFOAM version :
|
||||||
Compiler :
|
- Operating system :
|
||||||
|
- Hardware info :
|
||||||
|
- Compiler :
|
||||||
|
|
||||||
### Possible fixes
|
### Possible fixes
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
If you can, link to the line of code that might be responsible for the
|
If you can, link to the line of code that might be responsible for the
|
||||||
problem
|
problem
|
||||||
|
|
||||||
|
The "/label ~bug" text is a gitlab flag that will add the "bug" label to this
|
||||||
|
issue
|
||||||
-->
|
-->
|
||||||
|
|
||||||
/label ~bug
|
/label ~bug
|
||||||
|
|||||||
@ -622,11 +622,16 @@ Foam::label Foam::IOobjectList::filterClasses
|
|||||||
const bool pruning
|
const bool pruning
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
// This is like
|
||||||
// return HashPtrTable<IOobject>::filterValues
|
// return HashPtrTable<IOobject>::filterValues
|
||||||
// (
|
// (
|
||||||
// [&](const IOobject* io){ return pred(io->headerClassName()); },
|
// [&](const IOobject* io){ return pred(io->headerClassName()); },
|
||||||
// pruning
|
// pruning
|
||||||
// );
|
// );
|
||||||
|
// which is really
|
||||||
|
// return HashTable<IOobject*>::filterValues
|
||||||
|
//
|
||||||
|
// except that it does not leak
|
||||||
|
|
||||||
label changed = 0;
|
label changed = 0;
|
||||||
|
|
||||||
@ -654,7 +659,29 @@ Foam::label Foam::IOobjectList::filterObjects
|
|||||||
const bool pruning
|
const bool pruning
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return HashPtrTable<IOobject>::filterKeys(pred, pruning);
|
// This is like
|
||||||
|
// return HashPtrTable<IOobject>::filterKeys(pred, pruning);
|
||||||
|
// which is really
|
||||||
|
// return HashTable<IOobject*>::filterKeys(pred, pruning);
|
||||||
|
//
|
||||||
|
// except that it does not leak
|
||||||
|
|
||||||
|
label changed = 0;
|
||||||
|
|
||||||
|
for (iterator iter = begin(); iter != end(); ++iter)
|
||||||
|
{
|
||||||
|
// Matches? either prune (pruning) or keep (!pruning)
|
||||||
|
if
|
||||||
|
(
|
||||||
|
(pred(iter.key()) ? pruning : !pruning)
|
||||||
|
&& erase(iter)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
++changed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -299,7 +299,7 @@ Foam::DimensionedField<Type, GeoMesh>::DimensionedField
|
|||||||
const DimensionedField<Type, GeoMesh>& df
|
const DimensionedField<Type, GeoMesh>& df
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
regIOobject(newName, df, newName == df.name()),
|
regIOobject(newName, df, newName != df.name()),
|
||||||
Field<Type>(df),
|
Field<Type>(df),
|
||||||
mesh_(df.mesh_),
|
mesh_(df.mesh_),
|
||||||
dimensions_(df.dimensions_),
|
dimensions_(df.dimensions_),
|
||||||
|
|||||||
@ -413,14 +413,14 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
|
|||||||
scalarField lambdaTa4(pow4((1 - TpLambda)*Ta));
|
scalarField lambdaTa4(pow4((1 - TpLambda)*Ta));
|
||||||
|
|
||||||
hp += emissivity_*sigma.value()*(pow4(Ts) - lambdaTa4)/Tp;
|
hp += emissivity_*sigma.value()*(pow4(Ts) - lambdaTa4)/Tp;
|
||||||
hpTa += sigma.value()*(emissivity_*lambdaTa4 + pow4(Ta));
|
hpTa += emissivity_*sigma.value()*(lambdaTa4 + pow4(Ta));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// ... if there is no solid wall thermal resistance use
|
// ... if there is no solid wall thermal resistance use
|
||||||
// the current wall temperature
|
// the current wall temperature
|
||||||
hp += emissivity_*sigma.value()*pow3(Tp);
|
hp += emissivity_*sigma.value()*pow3(Tp);
|
||||||
hpTa += sigma.value()*pow4(Ta);
|
hpTa += emissivity_*sigma.value()*pow4(Ta);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -456,20 +456,14 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
|
|||||||
|
|
||||||
mixedFvPatchScalarField::updateCoeffs();
|
mixedFvPatchScalarField::updateCoeffs();
|
||||||
|
|
||||||
if (debug)
|
DebugInfo
|
||||||
{
|
<< patch().boundaryMesh().mesh().name() << ':' << patch().name() << ':'
|
||||||
const scalar Q = gSum(kappa(Tp)*patch().magSf()*snGrad());
|
|
||||||
|
|
||||||
Info<< patch().boundaryMesh().mesh().name() << ':'
|
|
||||||
<< patch().name() << ':'
|
|
||||||
<< internalField().name() << " :"
|
<< internalField().name() << " :"
|
||||||
<< " heat transfer rate:" << Q
|
<< " heat transfer rate:" << gSum(kappa(Tp)*patch().magSf()*snGrad())
|
||||||
<< " wall temperature "
|
<< " wall temperature "
|
||||||
<< " min:" << gMin(*this)
|
<< " min:" << gMin(*this)
|
||||||
<< " max:" << gMax(*this)
|
<< " max:" << gMax(*this)
|
||||||
<< " avg:" << gAverage(*this)
|
<< " avg:" << gAverage(*this) << nl;
|
||||||
<< endl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -42,15 +42,14 @@ License
|
|||||||
#include "vtkSmartPointer.h"
|
#include "vtkSmartPointer.h"
|
||||||
#include "vtkLight.h"
|
#include "vtkLight.h"
|
||||||
|
|
||||||
|
#include "vtkDummyController.h"
|
||||||
|
|
||||||
#ifdef FOAM_USING_VTK_MPI
|
#ifdef FOAM_USING_VTK_MPI
|
||||||
# include "vtkMPICommunicator.h"
|
# include "vtkMPICommunicator.h"
|
||||||
# include "vtkMPIController.h"
|
# include "vtkMPIController.h"
|
||||||
|
# include "vtkCompositedSynchronizedRenderers.h"
|
||||||
|
# include "vtkSynchronizedRenderWindows.h"
|
||||||
#endif
|
#endif
|
||||||
#include "vtkDummyController.h"
|
|
||||||
|
|
||||||
#include "vtkSynchronizedRenderWindows.h"
|
|
||||||
#include "vtkCompositedSynchronizedRenderers.h"
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -137,27 +136,21 @@ void Foam::functionObjects::runTimePostProcessing::render
|
|||||||
Log << name() << " render" << endl;
|
Log << name() << " render" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Normal rendering elements
|
|
||||||
vtkSmartPointer<vtkRenderer> renderer;
|
|
||||||
vtkSmartPointer<vtkRenderWindow> renderWindow;
|
|
||||||
|
|
||||||
// Multi-process synchronization
|
|
||||||
vtkSmartPointer<vtkSynchronizedRenderWindows> syncWindows;
|
|
||||||
vtkSmartPointer<vtkCompositedSynchronizedRenderers> syncRenderers;
|
|
||||||
|
|
||||||
|
|
||||||
// Disable any floating point trapping
|
// Disable any floating point trapping
|
||||||
// (some low-level rendering functionality does not like it)
|
// (some low-level rendering functionality does not like it)
|
||||||
|
|
||||||
sigFpe::ignore sigFpeHandling; //<- disable in local scope
|
sigFpe::ignore sigFpeHandling; //<- disable in local scope
|
||||||
|
|
||||||
|
|
||||||
|
// Normal rendering elements
|
||||||
|
vtkSmartPointer<vtkRenderer> renderer;
|
||||||
|
vtkSmartPointer<vtkRenderWindow> renderWindow;
|
||||||
|
|
||||||
// Initialise render window
|
// Initialise render window
|
||||||
if (controller || Pstream::master())
|
if (controller || Pstream::master())
|
||||||
{
|
{
|
||||||
renderWindow = vtkSmartPointer<vtkRenderWindow>::New();
|
|
||||||
renderer = vtkSmartPointer<vtkRenderer>::New();
|
renderer = vtkSmartPointer<vtkRenderer>::New();
|
||||||
|
renderWindow = vtkSmartPointer<vtkRenderWindow>::New();
|
||||||
|
|
||||||
renderWindow->OffScreenRenderingOn();
|
renderWindow->OffScreenRenderingOn();
|
||||||
renderWindow->SetSize(output_.width_, output_.height_);
|
renderWindow->SetSize(output_.width_, output_.height_);
|
||||||
@ -174,15 +167,22 @@ void Foam::functionObjects::runTimePostProcessing::render
|
|||||||
renderWindow->AddRenderer(renderer);
|
renderWindow->AddRenderer(renderer);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Synchronization
|
|
||||||
|
// ---------------------
|
||||||
|
#ifdef FOAM_USING_VTK_MPI
|
||||||
|
|
||||||
|
// Multi-process synchronization
|
||||||
|
vtkSmartPointer<vtkCompositedSynchronizedRenderers> syncRenderers;
|
||||||
|
vtkSmartPointer<vtkSynchronizedRenderWindows> syncWindows;
|
||||||
|
|
||||||
if (controller)
|
if (controller)
|
||||||
{
|
{
|
||||||
syncWindows =
|
|
||||||
vtkSmartPointer<vtkSynchronizedRenderWindows>::New();
|
|
||||||
|
|
||||||
syncRenderers =
|
syncRenderers =
|
||||||
vtkSmartPointer<vtkCompositedSynchronizedRenderers>::New();
|
vtkSmartPointer<vtkCompositedSynchronizedRenderers>::New();
|
||||||
|
|
||||||
|
syncWindows =
|
||||||
|
vtkSmartPointer<vtkSynchronizedRenderWindows>::New();
|
||||||
|
|
||||||
syncWindows->SetRenderWindow(renderWindow);
|
syncWindows->SetRenderWindow(renderWindow);
|
||||||
syncWindows->SetParallelController(controller);
|
syncWindows->SetParallelController(controller);
|
||||||
syncWindows->SetIdentifier(1);
|
syncWindows->SetIdentifier(1);
|
||||||
@ -193,7 +193,7 @@ void Foam::functionObjects::runTimePostProcessing::render
|
|||||||
syncRenderers->SetRenderer(renderer);
|
syncRenderers->SetRenderer(renderer);
|
||||||
syncRenderers->SetParallelController(controller);
|
syncRenderers->SetParallelController(controller);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
// ---------------------
|
// ---------------------
|
||||||
|
|
||||||
scene_.initialise(renderer, output_.name_);
|
scene_.initialise(renderer, output_.name_);
|
||||||
|
|||||||
Reference in New Issue
Block a user