Commit [r2036] Maximize Restore History

Adjusted to be used with OF2.3. Furthermore, the porousDamBreak case now offers comparison with experiments.

The tutorials are not yet adjusted to work with the changes from OF2.2 -> OF2.3.

ngjacobsen 2014-03-01

1 2 3 4 > >> (Page 1 of 4)
added /trunk/Breeder_1.6/other/waves2Foam/tutorials/porousWaveFoam/porousDamBreak/experimentalData/data_10.dat
added /trunk/Breeder_1.6/other/waves2Foam/tutorials/porousWaveFoam/porousDamBreak/experimentalData/data_12.dat
added /trunk/Breeder_1.6/other/waves2Foam/tutorials/porousWaveFoam/porousDamBreak/experimentalData/data_14.dat
added /trunk/Breeder_1.6/other/waves2Foam/tutorials/porousWaveFoam/porousDamBreak/experimentalData/data_16.dat
added /trunk/Breeder_1.6/other/waves2Foam/tutorials/porousWaveFoam/porousDamBreak/experimentalData/data_18.dat
removed /trunk/Breeder_1.6/other/waves2Foam/tutorials/waveFoam/bejiBattjes/constant/waveProperties.org
changed /trunk/Breeder_1.6/other/waves2Foam/src/waves2FoamSampling/overtopping/overtopping.H
changed /trunk/Breeder_1.6/other/waves2Foam/tutorials/waveFoam/periodicSolitary/Allrun
changed /trunk/Breeder_1.6/other/waves2Foam/tutorials/waveFoam/waveFlume/Allrun
changed /trunk/Breeder_1.6/other/waves2Foam/src/waves2FoamProcessing/preProcessing/probes/waveGauges/waveGauges.C
changed /trunk/Breeder_1.6/other/waves2Foam/Allwmake
changed /trunk/Breeder_1.6/other/waves2Foam/src/waves2FoamProcessing/preProcessing/probes/waveGauges/waveGauges.H
changed /trunk/Breeder_1.6/other/waves2Foam/applications/solvers/solvers170/waveFoam/waveFoam.C
changed /trunk/Breeder_1.6/other/waves2Foam/src/waves2FoamSampling/Make/options.220
changed /trunk/Breeder_1.6/other/waves2Foam/src/waves2FoamProcessing/postProcessing/postProcessingWaves/writeRawData/rawAlphaProbes/rawAlphaProbes.C
copied /trunk/Breeder_1.6/other/waves2Foam/tutorials/waveFoam/periodicSolitary/constant/waveProperties.17 -> /trunk/Breeder_1.6/other/waves2Foam/tutorials/waveFoam/periodicSolitary/constant/waveProperties.input
copied /trunk/Breeder_1.6/other/waves2Foam/tutorials/waveFoam/waveFlume/constant/waveProperties.org -> /trunk/Breeder_1.6/other/waves2Foam/tutorials/waveFoam/squarePile/constant/waveProperties.input
copied /trunk/Breeder_1.6/other/waves2Foam/tutorials/waveFoam/waveFlume/constant/waveProperties.17 -> /trunk/Breeder_1.6/other/waves2Foam/applications/solvers/solvers230/waveFoam/createFields.H
copied /trunk/Breeder_1.6/other/waves2Foam/tutorials/waveFoam/squarePile/constant/waveProperties.org -> /trunk/Breeder_1.6/other/waves2Foam/tutorials/porousWaveFoam/porousDamBreak/constant/postProcessingProperties
copied /trunk/Breeder_1.6/other/waves2Foam/tutorials/porousWaveFoam/porousDamBreak/constant/waveProperties.org -> /trunk/Breeder_1.6/other/waves2Foam/applications/solvers/solvers230/waveFoam/alphaEqnSubCycle.H
/trunk/Breeder_1.6/other/waves2Foam/tutorials/porousWaveFoam/porousDamBreak/experimentalData/data_10.dat Diff Switch to side-by-side view
Loading...
/trunk/Breeder_1.6/other/waves2Foam/tutorials/porousWaveFoam/porousDamBreak/experimentalData/data_12.dat Diff Switch to side-by-side view
Loading...
/trunk/Breeder_1.6/other/waves2Foam/tutorials/porousWaveFoam/porousDamBreak/experimentalData/data_14.dat Diff Switch to side-by-side view
Loading...
/trunk/Breeder_1.6/other/waves2Foam/tutorials/porousWaveFoam/porousDamBreak/experimentalData/data_16.dat Diff Switch to side-by-side view
Loading...
/trunk/Breeder_1.6/other/waves2Foam/tutorials/porousWaveFoam/porousDamBreak/experimentalData/data_18.dat Diff Switch to side-by-side view
Loading...
/trunk/Breeder_1.6/other/waves2Foam/src/waves2FoamSampling/overtopping/overtopping.H Diff Switch to side-by-side view
Loading...
/trunk/Breeder_1.6/other/waves2Foam/tutorials/waveFoam/periodicSolitary/Allrun Diff Switch to side-by-side view
Loading...
/trunk/Breeder_1.6/other/waves2Foam/tutorials/waveFoam/waveFlume/Allrun Diff Switch to side-by-side view
Loading...
/trunk/Breeder_1.6/other/waves2Foam/src/waves2FoamProcessing/preProcessing/probes/waveGauges/waveGauges.C Diff Switch to side-by-side view
Loading...
/trunk/Breeder_1.6/other/waves2Foam/Allwmake Diff Switch to side-by-side view
Loading...
/trunk/Breeder_1.6/other/waves2Foam/src/waves2FoamProcessing/preProcessing/probes/waveGauges/waveGauges.H Diff Switch to side-by-side view
Loading...
/trunk/Breeder_1.6/other/waves2Foam/applications/solvers/solvers170/waveFoam/waveFoam.C Diff Switch to side-by-side view
Loading...
/trunk/Breeder_1.6/other/waves2Foam/src/waves2FoamSampling/Make/options.220 Diff Switch to side-by-side view
Loading...
/trunk/Breeder_1.6/other/waves2Foam/src/waves2FoamProcessing/postProcessing/postProcessingWaves/writeRawData/rawAlphaProbes/rawAlphaProbes.C Diff Switch to side-by-side view
Loading...
/trunk/Breeder_1.6/other/waves2Foam/tutorials/waveFoam/periodicSolitary/constant/waveProperties.17 to /trunk/Breeder_1.6/other/waves2Foam/tutorials/waveFoam/periodicSolitary/constant/waveProperties.input
--- a/trunk/Breeder_1.6/other/waves2Foam/tutorials/waveFoam/periodicSolitary/constant/waveProperties.17
+++ b/trunk/Breeder_1.6/other/waves2Foam/tutorials/waveFoam/periodicSolitary/constant/waveProperties.input
@@ -20,8 +20,6 @@
 
 initializationName cyclic1;
 
-pName p_rgh;
-
 cyclic1Coeffs
 {
     waveType	solitaryFirst;
/trunk/Breeder_1.6/other/waves2Foam/tutorials/waveFoam/waveFlume/constant/waveProperties.org to /trunk/Breeder_1.6/other/waves2Foam/tutorials/waveFoam/squarePile/constant/waveProperties.input
--- a/trunk/Breeder_1.6/other/waves2Foam/tutorials/waveFoam/waveFlume/constant/waveProperties.org
+++ b/trunk/Breeder_1.6/other/waves2Foam/tutorials/waveFoam/squarePile/constant/waveProperties.input
@@ -1,86 +1,50 @@
-/*--------------------------------*- C++ -*----------------------------------*\
+/*---------------------------------------------------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  1.5                                   |
-|   \\  /    A nd           | Web:      http://www.OpenFOAM.org               |
+|  \\    /   O peration     | Version:  1.4                                   |
+|   \\  /    A nd           | Web:      http://www.openfoam.org               |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
+
 FoamFile
 {
-    version     2.0;
-    format      ascii;
-    class       dictionary;
-    object      environmentalProperties;
+    version         2.0;
+    format          ascii;
+
+    root            "";
+    case            "";
+    instance        "";
+    local           "";
+
+    class           dictionary;
+    object          environmentalProperties;
 }
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-timeShift       0.0;
+seaLevel	0.0;
 
-seaLevel	0.00;
+relaxationNames      (inlet);
 
-// A list of the relaxation zones in the simulation. The parameters are given
-// in <name>Coeffs below.
-relaxationNames (inlet outlet);
-
-initializationName outlet;
-
-pName pd;
+initializationName inlet;
 
 inletCoeffs
 {
-    // Wave type to be used at boundary "inlet" and in relaxation zone "inlet"
-    waveType    stokesFirst;  
+    waveType	potentialCurrent;
+    Tsoft       0;
+    U           (0.5 0 1);
     
-    // Ramp time of 2 s
-    Tsoft       2;
-
-    // Water depth at the boundary and in the relaxation zone
-    depth       0.400000;
-
-    // Cyclic wave frequency
-    omega       3.141593;
-
-    // Phase shift in the wave
-    phi         0.000000;
-
-    // Wave number vector, k. 
-    waveNumber  (1.70048 0.0 0.0);
-
-    // Wave height
-    height      0.1;
-    
-    // Specifications on the relaxation zone shape and relaxation scheme
     relaxationZone
     {
         relaxationScheme Spatial;
-        relaxationShape  Rectangular;
+        relaxationShape  Cylindrical;
         beachType        Empty;
-    
-        relaxType   INLET;
-        startX      (0 0.0 -1);
-        endX        (5 0.0  1);
-        orientation      (1.0 0.0 0.0);
+
+        rInner           30;
+        rOuter           40;
+        centre           (0 0 0);
     }
-};
-
-outletCoeffs
-{
-    waveType    potentialCurrent;
-    U           (0 0 0);
-    Tsoft       2;
-
-    relaxationZone
-    {
-        relaxationScheme Spatial;
-        relaxationShape  Rectangular;
-        beachType        Empty;    
-
-        relaxType   OUTLET;
-        startX      (13 0.0 -1);
-        endX        (18 0.0  1);
-        orientation      (1.0 0.0 0.0);
-    }
-};
+}
 
 
 
/trunk/Breeder_1.6/other/waves2Foam/tutorials/waveFoam/waveFlume/constant/waveProperties.17 to /trunk/Breeder_1.6/other/waves2Foam/applications/solvers/solvers230/waveFoam/createFields.H
--- a/trunk/Breeder_1.6/other/waves2Foam/tutorials/waveFoam/waveFlume/constant/waveProperties.17
+++ b/trunk/Breeder_1.6/other/waves2Foam/applications/solvers/solvers230/waveFoam/createFields.H
@@ -1,87 +1,139 @@
-/*--------------------------------*- C++ -*----------------------------------*\
-| =========                 |                                                 |
-| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  1.5                                   |
-|   \\  /    A nd           | Web:      http://www.OpenFOAM.org               |
-|    \\/     M anipulation  |                                                 |
-\*---------------------------------------------------------------------------*/
-FoamFile
-{
-    version     2.0;
-    format      ascii;
-    class       dictionary;
-    object      environmentalProperties;
-}
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+    Info<< "Reading field p_rgh\n" << endl;
+    volScalarField p_rgh
+    (
+        IOobject
+        (
+            "p_rgh",
+            runTime.timeName(),
+            mesh,
+            IOobject::MUST_READ,
+            IOobject::AUTO_WRITE
+        ),
+        mesh
+    );
 
-timeShift       0.0;
+    Info<< "Reading field U\n" << endl;
+    volVectorField U
+    (
+        IOobject
+        (
+            "U",
+            runTime.timeName(),
+            mesh,
+            IOobject::MUST_READ,
+            IOobject::AUTO_WRITE
+        ),
+        mesh
+    );
 
-seaLevel	0.00;
-
-// A list of the relaxation zones in the simulation. The parameters are given
-// in <name>Coeffs below.
-relaxationNames (inlet outlet);
-
-initializationName outlet;
-
-pName p_rgh;
-
-inletCoeffs
-{
-    // Wave type to be used at boundary "inlet" and in relaxation zone "inlet"
-    waveType    stokesFirst;  
-    
-    // Ramp time of 2 s
-    Tsoft       2;
-
-    // Water depth at the boundary and in the relaxation zone
-    depth       0.400000;
-
-    // Cyclic wave frequency
-    omega       3.141593;
-
-    // Phase shift in the wave
-    phi         0.000000;
-
-    // Wave number vector, k. 
-    waveNumber  (1.70048 0.0 0.0);
-
-    // Wave height
-    height      0.1;
-    
-    // Specifications on the relaxation zone shape and relaxation scheme
-    relaxationZone
-    {
-        relaxationScheme Spatial;
-        relaxationShape  Rectangular;
-        beachType        Empty;
-    
-        relaxType   INLET;
-        startX      (0 0.0 -1);
-        endX        (5 0.0  1);
-        orientation      (1.0 0.0 0.0);
-    }
-};
-
-outletCoeffs
-{
-    waveType    potentialCurrent;
-    U           (0 0 0);
-    Tsoft       2;
-
-    relaxationZone
-    {
-        relaxationScheme Spatial;
-        relaxationShape  Rectangular;
-        beachType        Empty;    
-
-        relaxType   OUTLET;
-        startX      (13 0.0 -1);
-        endX        (18 0.0  1);
-        orientation      (1.0 0.0 0.0);
-    }
-};
+    #include "createPhi.H"
 
 
+    Info<< "Reading transportProperties\n" << endl;
+    incompressibleTwoPhaseMixture twoPhaseProperties(U, phi);
 
-// ************************************************************************* //
+    volScalarField& alpha1(twoPhaseProperties.alpha1());
+    volScalarField& alpha2(twoPhaseProperties.alpha2());
+
+    const dimensionedScalar& rho1 = twoPhaseProperties.rho1();
+    const dimensionedScalar& rho2 = twoPhaseProperties.rho2();
+
+
+    // Need to store rho for ddt(rho, U)
+    volScalarField rho
+    (
+        IOobject
+        (
+            "rho",
+            runTime.timeName(),
+            mesh,
+            IOobject::READ_IF_PRESENT
+        ),
+        alpha1*rho1 + alpha2*rho2,
+        alpha1.boundaryField().types()
+    );
+    rho.oldTime();
+
+
+    // Mass flux
+    surfaceScalarField rhoPhi
+    (
+        IOobject
+        (
+            "rhoPhi",
+            runTime.timeName(),
+            mesh,
+            IOobject::NO_READ,
+            IOobject::NO_WRITE
+        ),
+        fvc::interpolate(rho)*phi
+    );
+
+
+    // Construct interface from alpha1 distribution
+    interfaceProperties interface(alpha1, U, twoPhaseProperties);
+
+
+    // Construct incompressible turbulence model
+    autoPtr<incompressible::turbulenceModel> turbulence
+    (
+        incompressible::turbulenceModel::New(U, phi, twoPhaseProperties)
+    );
+
+//    #include "readGravitationalAcceleration.H"
+
+    /*
+    dimensionedVector g0(g);
+
+    // Read the data file and initialise the interpolation table
+    interpolationTable<vector> timeSeriesAcceleration
+    (
+        runTime.path()/runTime.caseConstant()/"acceleration.dat"
+    );
+    */
+
+    Info<< "Calculating field g.h\n" << endl;
+    volScalarField gh("gh", g & mesh.C());
+    surfaceScalarField ghf("ghf", g & mesh.Cf());
+
+    volScalarField p
+    (
+        IOobject
+        (
+            "p",
+            runTime.timeName(),
+            mesh,
+            IOobject::NO_READ,
+            IOobject::AUTO_WRITE
+        ),
+        p_rgh + rho*gh
+    );
+
+    label pRefCell = 0;
+    scalar pRefValue = 0.0;
+    setRefCell
+    (
+        p,
+        p_rgh,
+        mesh.solutionDict().subDict("PIMPLE"),
+        pRefCell,
+        pRefValue
+    );
+
+    if (p_rgh.needReference())
+    {
+        p += dimensionedScalar
+        (
+            "p",
+            p.dimensions(),
+            pRefValue - getRefCellValue(p, pRefCell)
+        );
+        p_rgh = p - rho*gh;
+    }
+
+    fv::IOoptionList fvOptions(mesh);
+
+
+    tmp<surfaceScalarField> tphiAlphaCorr0;
+
+    relaxationZone relaxing(mesh, U, alpha1);
/trunk/Breeder_1.6/other/waves2Foam/tutorials/waveFoam/squarePile/constant/waveProperties.org to /trunk/Breeder_1.6/other/waves2Foam/tutorials/porousWaveFoam/porousDamBreak/constant/postProcessingProperties
--- a/trunk/Breeder_1.6/other/waves2Foam/tutorials/waveFoam/squarePile/constant/waveProperties.org
+++ b/trunk/Breeder_1.6/other/waves2Foam/tutorials/porousWaveFoam/porousDamBreak/constant/postProcessingProperties
@@ -1,53 +1,32 @@
-/*---------------------------------------------------------------------------*\
+/*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  1.4                                   |
-|   \\  /    A nd           | Web:      http://www.openfoam.org               |
+|  \\    /   O peration     | Version:  1.5                                   |
+|   \\  /    A nd           | Web:      http://www.OpenFOAM.org               |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
-
 FoamFile
 {
-    version         2.0;
-    format          ascii;
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    object      postProcessingProperties;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-    root            "";
-    case            "";
-    instance        "";
-    local           "";
+deleteParentOutputDirectory false;
 
-    class           dictionary;
-    object          environmentalProperties;
+data
+{
+    callName surfaceElevation;
+
+    removeDuplicate true;
+    inputDir surfaceElevation;
+
+    deltaT 0.2;
+
+    // action list is a set of processes on the data
+    actionList ( interpolateSurfaceElevation write2Ascii removeData);
 }
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-seaLevel	0.0;
-
-relaxationNames      (inlet);
-
-initializationName inlet;
-
-pName pd;
-
-inletCoeffs
-{
-    waveType	potentialCurrent;
-    Tsoft       0;
-    U           (0.5 0 1);
-    
-    relaxationZone
-    {
-        relaxationScheme Spatial;
-        relaxationShape  Cylindrical;
-        beachType        Empty;
-
-        rInner           30;
-        rOuter           40;
-        centre           (0 0 0);
-    }
-}
-
-
-
 // ************************************************************************* //
/trunk/Breeder_1.6/other/waves2Foam/tutorials/porousWaveFoam/porousDamBreak/constant/waveProperties.org to /trunk/Breeder_1.6/other/waves2Foam/applications/solvers/solvers230/waveFoam/alphaEqnSubCycle.H
--- a/trunk/Breeder_1.6/other/waves2Foam/tutorials/porousWaveFoam/porousDamBreak/constant/waveProperties.org
+++ b/trunk/Breeder_1.6/other/waves2Foam/applications/solvers/solvers230/waveFoam/alphaEqnSubCycle.H
@@ -1,29 +1,33 @@
-/*--------------------------------*- C++ -*----------------------------------*\
-| =========                 |                                                 |
-| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.1.0                                 |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
-|    \\/     M anipulation  |                                                 |
-\*---------------------------------------------------------------------------*/
-FoamFile
+if (nAlphaSubCycles > 1)
 {
-    version	2.0;
-    format	ascii;
-    class	dictionary;
-    object	waveProperties;
+    dimensionedScalar totalDeltaT = runTime.deltaT();
+    surfaceScalarField rhoPhiSum
+    (
+        IOobject
+        (
+            "rhoPhiSum",
+            runTime.timeName(),
+            mesh
+        ),
+        mesh,
+        dimensionedScalar("0", rhoPhi.dimensions(), 0)
+    );
+
+    for
+    (
+        subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
+        !(++alphaSubCycle).end();
+    )
+    {
+        #include "alphaEqn.H"
+        rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi;
+    }
+
+    rhoPhi = rhoPhiSum;
 }
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+else
+{
+    #include "alphaEqn.H"
+}
 
-timeShift           0;
-
-seaLevel            0;
-
-relaxationNames     ( );
-
-initializationName  ( );
-
-pName               pd;
-
-
-
-// ************************************************************************* //
+rho == alpha1*rho1 + alpha2*rho2;
1 2 3 4 > >> (Page 1 of 4)