Friday, November 30, 2018

The earth rings

https://www.nationalgeographic.com/science/2018/11/strange-earthquake-waves-rippled-around-world-earth-geology/

More Scale the Mesh 3


After: transformPoints -scale '(0.001 0.001 0.001)'    (Scale by mm)

/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  4.1                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       vectorField;
    location    "constant/polyMesh";
    object      points;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


882
(
(0 0 0)
(0.02 0 0)
(0 0 0.2)
(0.02 0 0.2)
(0 0.2 0)
(0.02 0.2 0)
(0 0.2 0.2)
(0.02 0.2 0.2)
(0 0 0.01)
(0 0 0.02)
(0 0 0.03)
(0 0 0.04)
(0 0 0.05)
(0 0 0.06)
(0 0 0.07)
(0 0 0.08)
(0 0 0.09)
(0 0 0.1)
(0 0 0.11)
(0 0 0.12)
(0 0 0.13)
(0 0 0.14)
(0 0 0.15)
(0 0 0.16)
(0 0 0.17)
(0 0 0.18)
(0 0 0.19)


-----------------------

Before:


/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  4.1                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       vectorField;
    location    "constant/polyMesh";
    object      points;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


882
(
(0 0 0)
(20 0 0)
(0 0 200)
(20 0 200)
(0 200 0)
(20 200 0)
(0 200 200)
(20 200 200)
(0 0 10)
(0 0 20)
(0 0 30)
(0 0 40)
(0 0 50)
(0 0 60)
(0 0 70)
(0 0 80)
(0 0 90)
(0 0 100)
(0 0 110)
(0 0 120)
(0 0 130)
(0 0 140)
(0 0 150)
(0 0 160)
(0 0 170)
(0 0 180)
(0 0 190)

-------------------------

transformPoints -scale '(0.01 0.01 0.01)'      scale by cm

Thursday, November 29, 2018

More Scale the Mesh 2

/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  4.1                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 0.1;

vertices
(
    (0 0 0)
    (1 0 0)
    (1 1 0)
    (0 1 0)
    (0 0 0.1)
    (1 0 0.1)
    (1 1 0.1)
    (0 1 0.1)
);
-----------------------------------------------------------------------------------

/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  4.1                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       vectorField;
    location    "constant/polyMesh";
    object      points;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


882
(
(0 0 0)
(0.005 0 0)
(0.01 0 0)
(0.015 0 0)
(0.02 0 0)
(0.025 0 0)
(0.03 0 0)
(0.035 0 0)
(0.04 0 0)
(0.045 0 0)
(0.05 0 0)
(0.055 0 0)
(0.06 0 0)
(0.065 0 0)
(0.07 0 0)
(0.075 0 0)
(0.08 0 0)
(0.085 0 0)
(0.09 0 0)
(0.095 0 0)
(0.1 0 0)
----------------------------------------------------------------------------------------------------

The step size is 0.1 / 20 or the "convertToMeters 0.1" divided by the number of patches "20".

What number of patches would one use for an irregular shape? Would it be based on the number of patches in the shortest face?

----------------------------------------------------------------------------------------------------

/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  4.1                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       polyBoundaryMesh;
    location    "constant/polyMesh";
    object      boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

3
(
    movingWall
    {
        type            wall;
        inGroups        1(wall);
        nFaces          20;
        startFace       760;
    }
    fixedWalls
    {
        type            wall;
        inGroups        1(wall);
        nFaces          60;
        startFace       780;
    }
    frontAndBack
    {
        type            empty;
        inGroups        1(empty);
        nFaces          800;
        startFace       840;
    }
)

More Scale the MEsh

incompressible/icoFoam/Mesh_1
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Processing tag:164
Starting reading units at line 3.
l:1
units:"  SI: Meter (newton)"
unitType:2
Unit factors:
    Length scale       : 1
    Force scale        : 1
    Temperature scale  : 1
    Temperature offset : 273.15


Processing tag:2420
Skipping tag 2420 on line 9
Skipping section at line 9.

Processing tag:2411
Starting reading points at line 20.
Read 882 points.

Processing tag:2412
Starting reading cells at line 1787.
First occurrence of element type 11 for cell 1 at line 1788
First occurrence of element type 44 for cell 85 at line 2280
First occurrence of element type 115 for cell 1045 at line 4040
Read 400 cells and 880 boundary faces.

Processing tag:2467
Starting reading patches at line 4842.
For group 1 named sourceFaceleft trying to read 400 patch face indices.
For group 2 named destinationFaceleft trying to read 400 patch face indices.
For group 3 named channelWallsleft trying to read 40 patch face indices.
For group 4 named leftRightWallleft trying to read 20 patch face indices.
For group 5 named inlet trying to read 20 patch face indices.

Sorting boundary faces according to group (patch)
0: sourceFaceleft is patch
1: destinationFaceleft is patch
2: channelWallsleft is patch
3: leftRightWallleft is patch
4: inlet is patch

Constructing mesh with non-default patches of size:
    sourceFaceleft    400
    destinationFaceleft    400
    channelWallsleft    40
    leftRightWallleft    20
    inlet    20

End
---------------------------------------------
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  4.1                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       vectorField;
    location    "constant/polyMesh";
    object      points;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


(0 0 0)
(0 0 10)
(0 0 20)
(0 0 30)
(0 0 40)
(0 0 50)
(0 0 60)
(0 0 70)
(0 0 80)
(0 0 90)
(0 0 100)
(0 0 110)
(0 0 120)
(0 0 130)
(0 0 140)
(0 0 150)
(0 0 160)
(0 0 170)
(0 0 180)
(0 0 190)
(0 0 200)



Saturday, November 24, 2018

Scale the Mesh

Scale the mesh:




By looking at:

https://www.cfd-online.com/Forums/openfoam-meshing/198268-how-scale-stl-when-importing-salome-any-cad-tool-openfoam.html

try:

transformPoints -scale '(0.001 0.001 0.001)'

https://cfd.direct/openfoam/user-guide/v6-basic-file-format/

https://openfoamwiki.net/index.php/TransformPoints4


What is the default mesh size???

http://www.salome-platform.org/forum/forum_10/549857363

-------------------------------------------------------------------------------------------------------
  -1
   164
         1  SI: Meter (newton)         2
    1.0000000000000000E+0    1.0000000000000000E+0    1.0000000000000000E+0
    2.7314999999999998E+2
    -1
    -1
  2420
         1
SMESH_Mesh
         1         0         0
Global Cartesian Coordinate System
    1.0000000000000000E+0    0.0000000000000000E+0    0.0000000000000000E+0
    0.0000000000000000E+0    1.0000000000000000E+0    0.0000000000000000E+0
    0.0000000000000000E+0    0.0000000000000000E+0    1.0000000000000000E+0
    0.0000000000000000E+0    0.0000000000000000E+0    0.0000000000000000E+0
    -1
    -1
  2411
         1         1         1        11
   2.0000000000000000E+01   4.5500000000000000E+02   0.0000000000000000E+00
         2         1         1        11
   0.0000000000000000E+00   4.5500000000000000E+02   0.0000000000000000E+00
         3         1         1        11
   2.0000000000000000E+01   5.2000000000000000E+02   0.0000000000000000E+00
         4         1         1        11
   0.0000000000000000E+00   5.2000000000000000E+02   0.0000000000000000E+00
         5         1         1        11
   2.0000000000000000E+01   1.6600000000000000E+02   5.0000000000000000E+02

-----------------------------------------------------------------------------------------------------
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  4.1                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 4.1
Exec   : ideasUnvToFoam InletMesh.unv
Date   : Nov 26 2018
Time   : 18:32:30
Host   : "caelinux"
PID    : 22307
Case   : /home/caelinux/OpenFOAM/caelinux-4.1/run/tutorials/incompressible/icoFoam/test-InletMesh
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Processing tag:164
Starting reading units at line 3.
l:1
units:"  SI: Meter (newton)"
unitType:2
Unit factors:
    Length scale       : 1
    Force scale        : 1
    Temperature scale  : 1
    Temperature offset : 273.15


-------------------------------------------------------------------------------
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  4.1                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       vectorField;
    location    "constant/polyMesh";
    object      points;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


882
(
(0 0 0)
(0.005 0 0)
(0.01 0 0)
(0.015 0 0)
(0.02 0 0)
(0.025 0 0)
(0.03 0 0)
(0.035 0 0)
(0.04 0 0)
(0.045 0 0)
(0.05 0 0)
(0.055 0 0)
(0.06 0 0)
(0.065 0 0)
(0.07 0 0)
(0.075 0 0)
(0.08 0 0)
(0.085 0 0)
(0.09 0 0)
(0.095 0 0)
(0.1 0 0)

---------------------------------

See: https://cfd.direct/openfoam/user-guide/v6-cavity/   ... length is 0.1 meters

To do: Nov 24th

Merge:

https://github.com/bshambaugh/openfoam-experiments/tree/master/InletMesh

with
https://github.com/bshambaugh/openfoam-experiments/tree/master/NGpitzDaily

This gives:

https://github.com/bshambaugh/openfoam-experiments/tree/master/BNGpitzDaily





with the error:

smoothSolver:  Solving for Ux, Initial residual = 8.87405e-07, Final residual = 8.87405e-07, No Iterations 0
smoothSolver:  Solving for Uy, Initial residual = 0.168394, Final residual = 4.90847e-07, No Iterations 11
smoothSolver:  Solving for Uz, Initial residual = 0.762311, Final residual = 8.70185e-07, No Iterations 13
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3  double Foam::sumProd<double>(Foam::UList<double> const&, Foam::UList<double> const&) at ??:?
#4  Foam::PCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
#5  Foam::GAMGSolver::solveCoarsestLevel(Foam::Field<double>&, Foam::Field<double> const&) const at ??:?
#6  Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMatrix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const at ??:?
#7  Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
#8  Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) at ??:?
#9  Foam::fvMatrix<double>::solve(Foam::dictionary const&) at ??:?
#10  Foam::fvMatrix<double>::solve() at ??:?
#11  ? at ??:?
#12  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#13  ? at ??:?
Floating point exception (core dumped)


Wednesday, November 21, 2018