OpenFOAM logo
Open Source CFD Toolkit

SIBS.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2005 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     SIBS
00027 
00028 Description
00029 
00030 SourceFiles
00031     SIBSCK.C
00032     SIBSQS.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef SIBS_H
00037 #define SIBS_H
00038 
00039 #include "ODESolver.H"
00040 
00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00042 
00043 namespace Foam
00044 {
00045 
00046 /*---------------------------------------------------------------------------*\
00047                            Class SIBS Declaration
00048 \*---------------------------------------------------------------------------*/
00049 
00050 class SIBS
00051 :
00052     public ODESolver
00053 {
00054     // Private data
00055 
00056         static const label kMaxX_ = 7, iMaxX_ = kMaxX_ + 1;
00057         static const label nSeq_[iMaxX_];
00058 
00059         static const scalar safe1, safe2, redMax, redMin, scaleMX;
00060 
00061         mutable scalarField a_;
00062         mutable Matrix<scalar> alpha_;
00063         mutable Matrix<scalar> d_p_;
00064         mutable scalarField x_p_;
00065         mutable scalarField err_;
00066 
00067         mutable scalarField yTemp_;
00068         mutable scalarField ySeq_;
00069         mutable scalarField yErr_;
00070         mutable scalarField dfdx_;
00071         mutable Matrix<scalar> dfdy_;
00072 
00073         mutable label first_, kMax_, kOpt_;
00074         mutable scalar epsOld_, xNew_;
00075 
00076 
00077 void SIMPR
00078 (
00079     const ODE& ode,
00080     const scalar xStart,
00081     const scalarField& y,
00082     const scalarField& dydx,
00083     const scalarField& dfdx,
00084     const Matrix<scalar>& dfdy, 
00085     const scalar deltaX,
00086     const label nSteps,
00087     scalarField& yEnd
00088 ) const;
00089 
00090 
00091 void polyExtrapolate
00092 (
00093     const label iest,
00094     const scalar xest,
00095     const scalarField& yest,
00096     scalarField& yz,
00097     scalarField& dy,
00098     scalarField& x_p,
00099     Matrix<scalar>& d_p
00100 ) const;
00101 
00102 
00103 public:
00104 
00105     //- Runtime type information
00106     TypeName("SIBS");
00107 
00108 
00109     // Constructors
00110 
00111         //- Construct from ODE
00112         SIBS(const ODE& ode);
00113 
00114 
00115     // Member Functions
00116 
00117         void solve
00118         (
00119             const ODE& ode,
00120             scalar& x,
00121             scalarField& y,
00122             scalarField& dydx,
00123             const scalar eps,
00124             const scalarField& yScale,
00125             const scalar hTry,
00126             scalar& hDid,
00127             scalar& hNext
00128         ) const;
00129 };
00130 
00131 
00132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00133 
00134 } // End namespace Foam
00135 
00136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00137 
00138 #endif
00139 
00140 // ************************************************************************* //
For further information go to www.openfoam.org