diff --git a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C index 5ecc9af8dbbb7bba5e003196ef3aecb9972ed0a3..18fe4b4ea7d67063efdd824ccae4e8485d1ca8b5 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C @@ -25,7 +25,7 @@ License #include "timeVaryingMappedFixedValueFvPatchField.H" #include "Time.H" -#include "AverageIOField.H" +#include "IFstream.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -240,21 +240,30 @@ void Foam::timeVaryingMappedFixedValueFvPatchField<Type>::checkTable() // Initialise if (mapperPtr_.empty()) { - pointIOField samplePoints + // Reread values and interpolate + fileName samplePointsFile ( - IOobject - ( - "points", - this->db().time().constant(), - "boundaryData"/this->patch().name(), - this->db(), - IOobject::MUST_READ, - IOobject::AUTO_WRITE, - false - ) + this->db().time().constant() + /"boundaryData" + /this->patch().name() + /"points" ); - const fileName samplePointsFile = samplePoints.filePath(); + pointField samplePoints((IFstream(samplePointsFile)())); + + // pointIOField samplePoints + // ( + // IOobject + // ( + // "points", + // this->db().time().constant(), + // "boundaryData"/this->patch().name(), + // this->db(), + // IOobject::MUST_READ, + // IOobject::AUTO_WRITE, + // false + // ) + // ); if (debug) { @@ -358,32 +367,42 @@ void Foam::timeVaryingMappedFixedValueFvPatchField<Type>::checkTable() // Reread values and interpolate - AverageIOField<Type> vals + fileName valsFile ( - IOobject - ( - fieldTableName_, - this->db().time().constant(), - "boundaryData" - /this->patch().name() - /sampleTimes_[startSampleTime_].name(), - this->db(), - IOobject::MUST_READ, - IOobject::AUTO_WRITE, - false - ) + this->db().time().constant() + /"boundaryData" + /this->patch().name() + /sampleTimes_[startSampleTime_].name() + /fieldTableName_ ); + Field<Type> vals((IFstream(valsFile)())); + // IOField<Type> vals + // ( + // IOobject + // ( + // fieldTableName_, + // this->db().time().constant(), + // "boundaryData" + // /this->patch().name() + // /sampleTimes_[startSampleTime_].name(), + // this->db(), + // IOobject::MUST_READ, + // IOobject::AUTO_WRITE, + // false + // ) + // ); + if (vals.size() != mapperPtr_().sourceSize()) { FatalErrorInFunction << "Number of values (" << vals.size() << ") differs from the number of points (" << mapperPtr_().sourceSize() - << ") in file " << vals.objectPath() << exit(FatalError); + << ") in file " << valsFile << exit(FatalError); } - startAverage_ = vals.average(); + //startAverage_ = vals.average(); startSampledValues_ = mapperPtr_().interpolate(vals); } } @@ -413,7 +432,7 @@ void Foam::timeVaryingMappedFixedValueFvPatchField<Type>::checkTable() } // Reread values and interpolate - AverageIOField<Type> vals + IOField<Type> vals ( IOobject ( @@ -438,7 +457,7 @@ void Foam::timeVaryingMappedFixedValueFvPatchField<Type>::checkTable() << ") in file " << vals.objectPath() << exit(FatalError); } - endAverage_ = vals.average(); + //endAverage_ = vals.average(); endSampledValues_ = mapperPtr_().interpolate(vals); } } diff --git a/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/constant/boundaryData/inlet/0/U b/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/constant/boundaryData/inlet/0/U index 8c8429a77cece292109d14aa0af7aba0191f96b3..f18990353663fbd65f5bb64cbda70ed3ea9cce7c 100644 --- a/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/constant/boundaryData/inlet/0/U +++ b/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/constant/boundaryData/inlet/0/U @@ -1,22 +1,3 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class vectorAverageField; - object values; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -// Average -(0 0 0) - // Data on points 70 ( diff --git a/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/constant/boundaryData/inlet/0/epsilon b/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/constant/boundaryData/inlet/0/epsilon index c2bf342ab6464c7a5fe2de88e4fb6e31f887afd7..24b5ecec8dd1fce5aac5fa36daa13c2eb4d26c48 100644 --- a/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/constant/boundaryData/inlet/0/epsilon +++ b/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/constant/boundaryData/inlet/0/epsilon @@ -1,22 +1,3 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class scalarAverageField; - object values; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -// Average -0 - // Data on points 70 ( diff --git a/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/constant/boundaryData/inlet/0/k b/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/constant/boundaryData/inlet/0/k index aa3e41c28f854000e182340bec94e02a62b21823..40cd92c01732622435c71d4f6d4e7803191e9353 100644 --- a/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/constant/boundaryData/inlet/0/k +++ b/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/constant/boundaryData/inlet/0/k @@ -1,22 +1,3 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class scalarAverageField; - object values; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -// Average -0.0 - // Data on points 70 ( diff --git a/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/constant/boundaryData/inlet/points b/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/constant/boundaryData/inlet/points index 1fc0437242b7fc5ac8dc2ae5dad3f6f3945d2900..a89e74a3aa5f88f1a4d7e2fd14441166e68a9e05 100644 --- a/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/constant/boundaryData/inlet/points +++ b/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/constant/boundaryData/inlet/points @@ -1,93 +1,80 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class vectorField; - object points; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - +// Points +70 ( - // min z - (-0.0206 0.000125 0) - (-0.0206 0.000375 0) - (-0.0206 0.000625 0) - (-0.0206 0.000875 0) - (-0.0206 0.001125 0) - (-0.0206 0.001375 0) - (-0.0206 0.001625 0) - (-0.0206 0.001875 0) - (-0.0206 0.00220314 0) - (-0.0206 0.00263672 0) - (-0.0206 0.00312852 0) - (-0.0206 0.00368638 0) - (-0.0206 0.00431918 0) - (-0.0206 0.00503697 0) - (-0.0206 0.00585116 0) - (-0.0206 0.0067747 0) - (-0.0206 0.00782229 0) - (-0.0206 0.00901059 0) - (-0.0206 0.0103585 0) - (-0.0206 0.0118874 0) - (-0.0206 0.0134739 0) - (-0.0206 0.0149487 0) - (-0.0206 0.0162845 0) - (-0.0206 0.0174943 0) - (-0.0206 0.0185901 0) - (-0.0206 0.0195826 0) - (-0.0206 0.0204815 0) - (-0.0206 0.0212956 0) - (-0.0206 0.022033 0) - (-0.0206 0.0227009 0) - (-0.0206 0.0233059 0) - (-0.0206 0.0238537 0) - (-0.0206 0.0243499 0) - (-0.0206 0.0247994 0) - (-0.0206 0.0252065 0) - // max z - (-0.0206 0.000125 0.173) - (-0.0206 0.000375 0.173) - (-0.0206 0.000625 0.173) - (-0.0206 0.000875 0.173) - (-0.0206 0.001125 0.173) - (-0.0206 0.001375 0.173) - (-0.0206 0.001625 0.173) - (-0.0206 0.001875 0.173) - (-0.0206 0.00220314 0.173) - (-0.0206 0.00263672 0.173) - (-0.0206 0.00312852 0.173) - (-0.0206 0.00368638 0.173) - (-0.0206 0.00431918 0.173) - (-0.0206 0.00503697 0.173) - (-0.0206 0.00585116 0.173) - (-0.0206 0.0067747 0.173) - (-0.0206 0.00782229 0.173) - (-0.0206 0.00901059 0.173) - (-0.0206 0.0103585 0.173) - (-0.0206 0.0118874 0.173) - (-0.0206 0.0134739 0.173) - (-0.0206 0.0149487 0.173) - (-0.0206 0.0162845 0.173) - (-0.0206 0.0174943 0.173) - (-0.0206 0.0185901 0.173) - (-0.0206 0.0195826 0.173) - (-0.0206 0.0204815 0.173) - (-0.0206 0.0212956 0.173) - (-0.0206 0.022033 0.173) - (-0.0206 0.0227009 0.173) - (-0.0206 0.0233059 0.173) - (-0.0206 0.0238537 0.173) - (-0.0206 0.0243499 0.173) - (-0.0206 0.0247994 0.173) - (-0.0206 0.0252065 0.173) +// min z +(-0.0206 0.000125 0) +(-0.0206 0.000375 0) +(-0.0206 0.000625 0) +(-0.0206 0.000875 0) +(-0.0206 0.001125 0) +(-0.0206 0.001375 0) +(-0.0206 0.001625 0) +(-0.0206 0.001875 0) +(-0.0206 0.00220314 0) +(-0.0206 0.00263672 0) +(-0.0206 0.00312852 0) +(-0.0206 0.00368638 0) +(-0.0206 0.00431918 0) +(-0.0206 0.00503697 0) +(-0.0206 0.00585116 0) +(-0.0206 0.0067747 0) +(-0.0206 0.00782229 0) +(-0.0206 0.00901059 0) +(-0.0206 0.0103585 0) +(-0.0206 0.0118874 0) +(-0.0206 0.0134739 0) +(-0.0206 0.0149487 0) +(-0.0206 0.0162845 0) +(-0.0206 0.0174943 0) +(-0.0206 0.0185901 0) +(-0.0206 0.0195826 0) +(-0.0206 0.0204815 0) +(-0.0206 0.0212956 0) +(-0.0206 0.022033 0) +(-0.0206 0.0227009 0) +(-0.0206 0.0233059 0) +(-0.0206 0.0238537 0) +(-0.0206 0.0243499 0) +(-0.0206 0.0247994 0) +(-0.0206 0.0252065 0) + +// max z +(-0.0206 0.000125 0.173) +(-0.0206 0.000375 0.173) +(-0.0206 0.000625 0.173) +(-0.0206 0.000875 0.173) +(-0.0206 0.001125 0.173) +(-0.0206 0.001375 0.173) +(-0.0206 0.001625 0.173) +(-0.0206 0.001875 0.173) +(-0.0206 0.00220314 0.173) +(-0.0206 0.00263672 0.173) +(-0.0206 0.00312852 0.173) +(-0.0206 0.00368638 0.173) +(-0.0206 0.00431918 0.173) +(-0.0206 0.00503697 0.173) +(-0.0206 0.00585116 0.173) +(-0.0206 0.0067747 0.173) +(-0.0206 0.00782229 0.173) +(-0.0206 0.00901059 0.173) +(-0.0206 0.0103585 0.173) +(-0.0206 0.0118874 0.173) +(-0.0206 0.0134739 0.173) +(-0.0206 0.0149487 0.173) +(-0.0206 0.0162845 0.173) +(-0.0206 0.0174943 0.173) +(-0.0206 0.0185901 0.173) +(-0.0206 0.0195826 0.173) +(-0.0206 0.0204815 0.173) +(-0.0206 0.0212956 0.173) +(-0.0206 0.022033 0.173) +(-0.0206 0.0227009 0.173) +(-0.0206 0.0233059 0.173) +(-0.0206 0.0238537 0.173) +(-0.0206 0.0243499 0.173) +(-0.0206 0.0247994 0.173) +(-0.0206 0.0252065 0.173) )