Skip to content

Commit

Permalink
uploading tutorials for workshop
Browse files Browse the repository at this point in the history
  • Loading branch information
jiaweiwan-jay committed Jul 9, 2020
1 parent 3e3264f commit 8b214f9
Show file tree
Hide file tree
Showing 102 changed files with 12,781 additions and 101 deletions.
7 changes: 5 additions & 2 deletions ExampleInput/windAroundSquarePrism/0/U
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@ boundaryField
{
type noSlip;
}

#includeEtc "caseDicts/setConstraintTypes"

frontAndBack
{
type symmetry;
}
}

// ************************************************************************* //
32 changes: 8 additions & 24 deletions ExampleInput/windAroundSquarePrism/system/controlDict
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

libs ("libturbulentInflow.so");

application pisoFoam;

startFrom startTime;
Expand Down Expand Up @@ -87,18 +85,11 @@ functions
writeControl timeStep;
timeInterval 1;

log yes;
patches (building);
log yes;
patches (building);
rho rhoInf;
rhoInf 1;
rhoInf 1.225;
CofR (55 55 0);

binData
{
nBin 20;
direction (0 0 1);
cumulative yes;
}
}

forceCoeffs1
Expand All @@ -113,21 +104,14 @@ functions

patches (building);
rho rhoInf;
rhoInf 1;
liftDir (0 0 1);
rhoInf 1.225;
liftDir (0 1 0);
dragDir (1 0 0);
CofR (55 55 0);
pitchAxis (0 0 1);
pitchAxis (0 1 0);
magUInf 10;
lRef 10;
Aref 10;

binData
{
nBin 20;
direction (0 0 1);
cumulative yes;
}
lRef 50;
Aref 500;
}
}

Expand Down
3 changes: 3 additions & 0 deletions tutorials/TInFFoam/Make/files
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
TInFFoam.C

EXE = $(FOAM_USER_APPBIN)/TInFFoam
1,488 changes: 1,488 additions & 0 deletions tutorials/TInFFoam/Make/linux64GccDPInt32Opt/TInFFoam.C.dep

Large diffs are not rendered by default.

60 changes: 60 additions & 0 deletions tutorials/TInFFoam/Make/linux64GccDPInt32Opt/options
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# 1 "Make/options"
# 1 "<built-in>"
# 1 "<command-line>"
# 8 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4

# 17 "/usr/include/stdc-predef.h" 3 4














































# 8 "<command-line>" 2
# 1 "Make/options"
EXE_INC = -I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/meshTools/lnInclude



EXE_LIBS = -lfiniteVolume -lmeshTools
2 changes: 2 additions & 0 deletions tutorials/TInFFoam/Make/linux64GccDPInt32Opt/sourceFiles
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SOURCE = \
TInFFoam.C
1 change: 1 addition & 0 deletions tutorials/TInFFoam/Make/linux64GccDPInt32Opt/variables
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
EXE = $(FOAM_USER_APPBIN)/TInFFoam
7 changes: 7 additions & 0 deletions tutorials/TInFFoam/Make/options
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude

EXE_LIBS = \
-lfiniteVolume \
-lmeshTools
66 changes: 66 additions & 0 deletions tutorials/TInFFoam/TInFFoam.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
icoFoam
Description
Transient solver for incompressible, laminar flow of Newtonian fluids.
\*---------------------------------------------------------------------------*/

#include "fvCFD.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

int main(int argc, char *argv[])
{
#include "setRootCaseLists.H"
#include "createTime.H"
#include "createMesh.H"
#include "createFields.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

Info<< "\nStarting time loop\n" << endl;

while (runTime.loop())
{
Info<< "Time = " << runTime.timeName() << nl << endl;

U.correctBoundaryConditions();

runTime.write();

Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}

Info<< "End\n" << endl;

return 0;
}


// ************************************************************************* //
15 changes: 15 additions & 0 deletions tutorials/TInFFoam/createFields.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Info<< "Reading field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);

#include "createPhi.H"
83 changes: 83 additions & 0 deletions tutorials/homogenousTurbulence/0/U
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 6
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 1 -1 0 0 0 0];

internalField uniform (1 0 0);

boundaryField
{

inlet
{
type turbulentATSMInlet;
periodicInY true;
periodicInZ true;
vortonType "typeL";
density 1;
value $internalField;

U uniform 1.0;
R uniform (0.01 0 0 0.075 0 0.05);
L uniform (0.4 0.3 0.2);

/*
type turbulentATSMInlet;
periodicInY true;
periodicInZ true;
vortonType "typeL";
density 1;
value $internalField;
U uniform 1.0;
R uniform (0.01 0 0 0.075 0 0.05);
L uniform (0.4 0.3 0.2);
type turbulentSEMInlet;
periodicInY true;
periodicInZ true;
density 10;
value $internalField;
U uniform 1.0;
R uniform (0.01 0 0 0.075 0 0.05);
L uniform (0.4 0.4 0.4 0.3 0.3 0.3 0.2 0.2 0.2);
type turbulentDFMInlet;
periodicInY true;
periodicInZ true;
filterType "gaussian";
filterFactor 4;
gridFactor 1;
value $internalField;
U uniform 1.0;
R uniform (0.01 0 0 0.075 0 0.05);
L uniform (0.4 0.4 0.4 0.3 0.3 0.3 0.2 0.2 0.2);
*/
}

outlet
{
type zeroGradient;
}

#includeEtc "caseDicts/setConstraintTypes"
}


// ************************************************************************* //
39 changes: 39 additions & 0 deletions tutorials/homogenousTurbulence/0/k
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 6
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet
{
type fixedValue;
value $internalField;
}

outlet
{
type zeroGradient;
}

#includeEtc "caseDicts/setConstraintTypes"
}


// ************************************************************************* //
40 changes: 40 additions & 0 deletions tutorials/homogenousTurbulence/0/nut
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 6
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -1 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet
{
type calculated;
value uniform 0;
}

outlet
{
type calculated;
value uniform 0;
}

#includeEtc "caseDicts/setConstraintTypes"
}


// ************************************************************************* //
Loading

0 comments on commit 8b214f9

Please sign in to comment.