mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
cellSource: Writing the volume of the cellSource (sum(V)) for each time is now optional
Previous behavior which may be useful for moving-mesh cases can be
selected using the optional entry:
writeVolume yes;
The initial volume is written in the log and data file header e.g.:
# Source : all
# Cells : 3829
# Volume : 9.943164e-01
Also added
sumMag | sum of component magnitudes
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -90,6 +90,11 @@ Type Foam::fieldValues::cellSource::processValues
|
||||
result = sum(values);
|
||||
break;
|
||||
}
|
||||
case opSumMag:
|
||||
{
|
||||
result = sum(cmptMag(values));
|
||||
break;
|
||||
}
|
||||
case opAverage:
|
||||
{
|
||||
result = sum(values)/values.size();
|
||||
@ -201,7 +206,7 @@ bool Foam::fieldValues::cellSource::writeValues(const word& fieldName)
|
||||
file()<< tab << result;
|
||||
|
||||
Info(log_)<< " " << operationTypeNames_[operation_]
|
||||
<< "(" << sourceName_ << ") for " << fieldName
|
||||
<< "(" << sourceName_ << ") of " << fieldName
|
||||
<< " = " << result << endl;
|
||||
}
|
||||
}
|
||||
@ -221,4 +226,3 @@ Foam::tmp<Foam::Field<Type> > Foam::fieldValues::cellSource::filterField
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
|
||||
Reference in New Issue
Block a user