Removed duplicate library / utility
This commit is contained in:
parent
a636a79642
commit
1be2b28a4b
16 changed files with 0 additions and 1148 deletions
|
@ -1,10 +0,0 @@
|
|||
extrudeModel/extrudeModel.C
|
||||
extrudeModel/newExtrudeModel.C
|
||||
linearNormal/linearNormal.C
|
||||
linearRadial/linearRadial.C
|
||||
sigmaRadial/sigmaRadial.C
|
||||
wedge/wedge.C
|
||||
gradedNormal/gradedNormal.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libextrudeModel
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
EXE_INC = \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||
-I$(LIB_SRC)/ODE/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lmeshTools \
|
||||
-ldynamicMesh \
|
||||
-lODE
|
|
@ -1,65 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration | Version: 4.0
|
||||
\\ / A nd | Web: http://www.foam-extend.org
|
||||
\\/ M anipulation | For copyright notice see file Copyright
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of foam-extend.
|
||||
|
||||
foam-extend 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.
|
||||
|
||||
foam-extend 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 foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "extrudeModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(extrudeModel, 0);
|
||||
defineRunTimeSelectionTable(extrudeModel, dictionary);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::extrudeModel::extrudeModel
|
||||
(
|
||||
const word& modelType,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
nLayers_(readLabel(dict.lookup("nLayers"))),
|
||||
dict_(dict),
|
||||
coeffDict_(dict.subDict(modelType + "Coeffs"))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::extrudeModel::~extrudeModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::label Foam::extrudeModel::nLayers() const
|
||||
{
|
||||
return nLayers_;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,135 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration | Version: 4.0
|
||||
\\ / A nd | Web: http://www.foam-extend.org
|
||||
\\/ M anipulation | For copyright notice see file Copyright
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of foam-extend.
|
||||
|
||||
foam-extend 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.
|
||||
|
||||
foam-extend 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 foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::extrudeModel
|
||||
|
||||
Description
|
||||
Top level extrusion model class
|
||||
|
||||
SourceFiles
|
||||
extrudeModel.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef extrudeModel_H
|
||||
#define extrudeModel_H
|
||||
|
||||
#include "dictionary.H"
|
||||
#include "point.H"
|
||||
#include "autoPtr.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class extrudeModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class extrudeModel
|
||||
{
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
const label nLayers_;
|
||||
|
||||
const dictionary& dict_;
|
||||
|
||||
const dictionary& coeffDict_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
extrudeModel(const extrudeModel&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const extrudeModel&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("extrudeModel");
|
||||
|
||||
//- Declare runtime constructor selection table
|
||||
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
extrudeModel,
|
||||
dictionary,
|
||||
(
|
||||
const dictionary& dict
|
||||
),
|
||||
(dict)
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from dictionary
|
||||
extrudeModel(const word& modelType, const dictionary&);
|
||||
|
||||
|
||||
// Selectors
|
||||
|
||||
//- Select null constructed
|
||||
static autoPtr<extrudeModel> New(const dictionary&);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~extrudeModel();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access
|
||||
|
||||
label nLayers() const;
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
virtual point operator()
|
||||
(
|
||||
const point& surfacePoint,
|
||||
const vector& surfaceNormal,
|
||||
const label layer
|
||||
) const = 0;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
|
@ -1,58 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration | Version: 4.0
|
||||
\\ / A nd | Web: http://www.foam-extend.org
|
||||
\\/ M anipulation | For copyright notice see file Copyright
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of foam-extend.
|
||||
|
||||
foam-extend 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.
|
||||
|
||||
foam-extend 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 foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "extrudeModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::extrudeModel> Foam::extrudeModel::New
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word extrudeModelType(dict.lookup("extrudeModel"));
|
||||
|
||||
Info<< "Selecting extrudeModel " << extrudeModelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(extrudeModelType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorIn("extrudeModel::New(const dictionary&)")
|
||||
<< "Unknown extrudeModelType type "
|
||||
<< extrudeModelType
|
||||
<< ", constructor not in hash table" << nl << nl
|
||||
<< " Valid extrudeModel types are :" << nl
|
||||
<< dictionaryConstructorTablePtr_->toc() << nl
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<extrudeModel>(cstrIter()(dict));
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,85 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration | Version: 4.0
|
||||
\\ / A nd | Web: http://www.foam-extend.org
|
||||
\\/ M anipulation | For copyright notice see file Copyright
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of foam-extend.
|
||||
|
||||
foam-extend 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.
|
||||
|
||||
foam-extend 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 foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "linearNormal.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace extrudeModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(linearNormal, 0);
|
||||
|
||||
addToRunTimeSelectionTable(extrudeModel, linearNormal, dictionary);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
linearNormal::linearNormal(const dictionary& dict)
|
||||
:
|
||||
extrudeModel(typeName, dict),
|
||||
thickness_(readScalar(coeffDict_.lookup("thickness")))
|
||||
{
|
||||
if (thickness_ <= SMALL)
|
||||
{
|
||||
FatalErrorIn("linearNormal(const dictionary&)")
|
||||
<< "thickness should be positive : " << thickness_
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
linearNormal::~linearNormal()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Operators * * * * * * * * * * * * * * * * //
|
||||
|
||||
point linearNormal::operator()
|
||||
(
|
||||
const point& surfacePoint,
|
||||
const vector& surfaceNormal,
|
||||
const label layer
|
||||
) const
|
||||
{
|
||||
scalar d = thickness_*layer/nLayers_;
|
||||
return surfacePoint + d*surfaceNormal;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace extrudeModels
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,95 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration | Version: 4.0
|
||||
\\ / A nd | Web: http://www.foam-extend.org
|
||||
\\/ M anipulation | For copyright notice see file Copyright
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of foam-extend.
|
||||
|
||||
foam-extend 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.
|
||||
|
||||
foam-extend 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 foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::extrudeModels::linearNormal
|
||||
|
||||
Description
|
||||
Extrudes by transforming points normal to the surface by a given distance
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef linearNormal_H
|
||||
#define linearNormal_H
|
||||
|
||||
#include "point.H"
|
||||
#include "extrudeModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace extrudeModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class linearNormal Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class linearNormal
|
||||
:
|
||||
public extrudeModel
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- layer thickness
|
||||
scalar thickness_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("linearNormal");
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
linearNormal(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
~linearNormal();
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
point operator()
|
||||
(
|
||||
const point& surfacePoint,
|
||||
const vector& surfaceNormal,
|
||||
const label layer
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace extrudeModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,81 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration | Version: 4.0
|
||||
\\ / A nd | Web: http://www.foam-extend.org
|
||||
\\/ M anipulation | For copyright notice see file Copyright
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of foam-extend.
|
||||
|
||||
foam-extend 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.
|
||||
|
||||
foam-extend 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 foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "linearRadial.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace extrudeModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(linearRadial, 0);
|
||||
|
||||
addToRunTimeSelectionTable(extrudeModel, linearRadial, dictionary);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
linearRadial::linearRadial(const dictionary& dict)
|
||||
:
|
||||
extrudeModel(typeName, dict),
|
||||
R_(readScalar(coeffDict_.lookup("R")))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
linearRadial::~linearRadial()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Operators * * * * * * * * * * * * * * * * //
|
||||
|
||||
point linearRadial::operator()
|
||||
(
|
||||
const point& surfacePoint,
|
||||
const vector& surfaceNormal,
|
||||
const label layer
|
||||
) const
|
||||
{
|
||||
// radius of the surface
|
||||
scalar rs = mag(surfacePoint);
|
||||
vector rsHat = surfacePoint/rs;
|
||||
|
||||
scalar delta = (R_ - rs)/nLayers_;
|
||||
scalar r = rs + layer*delta;
|
||||
return r*rsHat;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace extrudeModels
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,92 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration | Version: 4.0
|
||||
\\ / A nd | Web: http://www.foam-extend.org
|
||||
\\/ M anipulation | For copyright notice see file Copyright
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of foam-extend.
|
||||
|
||||
foam-extend 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.
|
||||
|
||||
foam-extend 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 foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::extrudeModels::linearRadial
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef linearRadial_H
|
||||
#define linearRadial_H
|
||||
|
||||
#include "extrudeModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace extrudeModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class linearRadial Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class linearRadial
|
||||
:
|
||||
public extrudeModel
|
||||
{
|
||||
// Private data
|
||||
|
||||
scalar R_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("linearRadial");
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
linearRadial(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
~linearRadial();
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
point operator()
|
||||
(
|
||||
const point& surfacePoint,
|
||||
const vector& surfaceNormal,
|
||||
const label layer
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace extrudeModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,86 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration | Version: 4.0
|
||||
\\ / A nd | Web: http://www.foam-extend.org
|
||||
\\/ M anipulation | For copyright notice see file Copyright
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of foam-extend.
|
||||
|
||||
foam-extend 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.
|
||||
|
||||
foam-extend 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 foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "sigmaRadial.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace extrudeModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(sigmaRadial, 0);
|
||||
|
||||
addToRunTimeSelectionTable(extrudeModel, sigmaRadial, dictionary);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
sigmaRadial::sigmaRadial(const dictionary& dict)
|
||||
:
|
||||
extrudeModel(typeName, dict),
|
||||
RTbyg_(readScalar(coeffDict_.lookup("RTbyg"))),
|
||||
pRef_(readScalar(coeffDict_.lookup("pRef"))),
|
||||
pStrat_(readScalar(coeffDict_.lookup("pStrat")))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
sigmaRadial::~sigmaRadial()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Operators * * * * * * * * * * * * * * * * //
|
||||
|
||||
point sigmaRadial::operator()
|
||||
(
|
||||
const point& surfacePoint,
|
||||
const vector& surfaceNormal,
|
||||
const label layer
|
||||
) const
|
||||
{
|
||||
// radius of the surface
|
||||
scalar rs = mag(surfacePoint);
|
||||
vector rsHat = surfacePoint/rs;
|
||||
|
||||
scalar p = pRef_ - layer*(pRef_ - pStrat_)/nLayers_;
|
||||
scalar r = rs - RTbyg_*log(p/pRef_);
|
||||
|
||||
return r*rsHat;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace extrudeModels
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,94 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration | Version: 4.0
|
||||
\\ / A nd | Web: http://www.foam-extend.org
|
||||
\\/ M anipulation | For copyright notice see file Copyright
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of foam-extend.
|
||||
|
||||
foam-extend 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.
|
||||
|
||||
foam-extend 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 foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::extrudeModels::sigmaRadial
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef sigmaRadial_H
|
||||
#define sigmaRadial_H
|
||||
|
||||
#include "extrudeModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace extrudeModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class sigmaRadial Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class sigmaRadial
|
||||
:
|
||||
public extrudeModel
|
||||
{
|
||||
// Private data
|
||||
|
||||
scalar RTbyg_;
|
||||
scalar pRef_;
|
||||
scalar pStrat_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("sigmaRadial");
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
sigmaRadial(const dictionary& dict);
|
||||
|
||||
|
||||
//-Destructor
|
||||
~sigmaRadial();
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
point operator()
|
||||
(
|
||||
const point& surfacePoint,
|
||||
const vector& surfaceNormal,
|
||||
const label layer
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace extrudeModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,126 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration | Version: 4.0
|
||||
\\ / A nd | Web: http://www.foam-extend.org
|
||||
\\/ M anipulation | For copyright notice see file Copyright
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of foam-extend.
|
||||
|
||||
foam-extend 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.
|
||||
|
||||
foam-extend 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 foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "wedge.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "mathematicalConstants.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace extrudeModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(wedge, 0);
|
||||
|
||||
addToRunTimeSelectionTable(extrudeModel, wedge, dictionary);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
wedge::wedge(const dictionary& dict)
|
||||
:
|
||||
extrudeModel(typeName, dict),
|
||||
axisPt_(coeffDict_.lookup("axisPt")),
|
||||
axis_(coeffDict_.lookup("axis")),
|
||||
angle_
|
||||
(
|
||||
readScalar(coeffDict_.lookup("angle"))
|
||||
*mathematicalConstant::pi/180.0
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
wedge::~wedge()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Operators * * * * * * * * * * * * * * * * //
|
||||
|
||||
point wedge::operator()
|
||||
(
|
||||
const point& surfacePoint,
|
||||
const vector& surfaceNormal,
|
||||
const label layer
|
||||
) const
|
||||
{
|
||||
scalar sliceAngle;
|
||||
// For the case of a single layer extrusion assume a
|
||||
// symmetric wedge about the reference plane is required
|
||||
if (nLayers_ == 1)
|
||||
{
|
||||
if (layer == 0)
|
||||
{
|
||||
sliceAngle = -angle_/2.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
sliceAngle = angle_/2.0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//sliceAngle = angle_*(layer + 1)/nLayers_;
|
||||
sliceAngle = angle_*layer/nLayers_;
|
||||
}
|
||||
|
||||
// Find projection onto axis (or rather decompose surfacePoint
|
||||
// into vector along edge (proj), vector normal to edge in plane
|
||||
// of surface point and surface normal.
|
||||
point d = surfacePoint - axisPt_;
|
||||
|
||||
d -= (axis_ & d)*axis_;
|
||||
|
||||
scalar dMag = mag(d);
|
||||
|
||||
point edgePt = surfacePoint - d;
|
||||
|
||||
// Rotate point around sliceAngle.
|
||||
point rotatedPoint = edgePt;
|
||||
|
||||
if (dMag > VSMALL)
|
||||
{
|
||||
vector n = (d/dMag) ^ axis_;
|
||||
|
||||
rotatedPoint +=
|
||||
+ cos(sliceAngle)*d
|
||||
- sin(sliceAngle)*mag(d)*n; // Use either n or surfaceNormal
|
||||
}
|
||||
|
||||
return rotatedPoint;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace extrudeModels
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
|
@ -1,107 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration | Version: 4.0
|
||||
\\ / A nd | Web: http://www.foam-extend.org
|
||||
\\/ M anipulation | For copyright notice see file Copyright
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of foam-extend.
|
||||
|
||||
foam-extend 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.
|
||||
|
||||
foam-extend 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 foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::extrudeModels::wedge
|
||||
|
||||
Description
|
||||
Extrudes by rotating a surface around an axis
|
||||
- extrusion is opposite the surface/patch normal so inwards the source
|
||||
mesh
|
||||
- axis direction has to be consistent with this.
|
||||
- use -mergeFaces option if doing full 360 and want to merge front and back
|
||||
- note direction of axis. This should be consistent with rotating against
|
||||
the patch normal direction. If you get it wrong you'll see all cells
|
||||
with extreme aspect ratio and internal faces wrong way around in
|
||||
checkMesh
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef wedge_H
|
||||
#define wedge_H
|
||||
|
||||
#include "extrudeModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace extrudeModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class wedge Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class wedge
|
||||
:
|
||||
public extrudeModel
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Point on axis
|
||||
const point axisPt_;
|
||||
|
||||
//- Normalized direction of axis
|
||||
const vector axis_;
|
||||
|
||||
//- Overall angle (radians)
|
||||
const scalar angle_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("wedge");
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
wedge(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destrcuctor
|
||||
~wedge();
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
point operator()
|
||||
(
|
||||
const point& surfacePoint,
|
||||
const vector& surfaceNormal,
|
||||
const label layer
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace extrudeModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
|
@ -1,3 +0,0 @@
|
|||
patchStressIntegrate.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/patchStressIntegrate
|
|
@ -1,7 +0,0 @@
|
|||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools
|
|
@ -1,95 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration | Version: 4.0
|
||||
\\ / A nd | Web: http://www.foam-extend.org
|
||||
\\/ M anipulation | For copyright notice see file Copyright
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of foam-extend.
|
||||
|
||||
foam-extend 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.
|
||||
|
||||
foam-extend 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 foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
Calculates the total forces on a patch:
|
||||
total force vector
|
||||
total normal force
|
||||
total force in each direction (x, y and z)
|
||||
|
||||
Author
|
||||
philip.cardiff@ucd.ie
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
# include "setRootCase.H"
|
||||
|
||||
# include "createTime.H"
|
||||
|
||||
# include "createMesh.H"
|
||||
|
||||
while(runTime.loop())
|
||||
{
|
||||
Info<< "Time: " << runTime.timeName() << nl << endl;
|
||||
|
||||
volSymmTensorField sigma
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"sigma",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
Info << nl;
|
||||
|
||||
vector netForce = vector::zero;
|
||||
|
||||
forAll(mesh.boundary(), patchID)
|
||||
{
|
||||
vectorField n = mesh.boundary()[patchID].nf();
|
||||
const vectorField& Sf = mesh.boundary()[patchID].Sf();
|
||||
const symmTensorField& sigmaPatch = sigma.boundaryField()[patchID];
|
||||
|
||||
vector totalForce = sum(Sf & sigmaPatch);
|
||||
netForce += totalForce;
|
||||
scalar totalNormalForce = sum(n & (Sf & sigmaPatch));
|
||||
vector totalShearForce = sum((I -sqr(n)) & (Sf & sigmaPatch));
|
||||
|
||||
Info << "Patch: " << mesh.boundary()[patchID].name() << nl
|
||||
<< "\tTotal Force:\t\t" << totalForce << " N\n"
|
||||
<< "\tTotal Normal Force:\t" << totalNormalForce << " N\n"
|
||||
<< "\tTotal Shear Force:\t" << totalShearForce << " N\n" << endl;
|
||||
}
|
||||
|
||||
Info << nl << "Net force on model is " << netForce << " N" << endl;
|
||||
|
||||
}
|
||||
|
||||
Info << nl << "End" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
Reference in a new issue