Commit 6628437b by Thomas Fetzer

### [common,geomechanics,mutlidomain,io] reduced excessive line lengths, like...

[common,geomechanics,mutlidomain,io] reduced excessive line lengths, like proposed in #FS213, target line
length = 150, thanks to kristopherg

reviewed by fetzer

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@12431 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent ce76dc2d
 ... ... @@ -58,7 +58,8 @@ public: * into this function (e.g.: face-area weighted average). [m/s] * \param charcteristicLength Typically, in the context of porous media flow, the mean grain size is taken as the characteristic length * for calculation of Re. [m] * \param kinematicViscosity Is defined as the dynamic (or absolute) viscosity divided by the density. http://en.wikipedia.org/wiki/Viscosity#Dynamic_viscosity. [m^2/s] * \param kinematicViscosity Is defined as the dynamic (or absolute) viscos ity divided by the density. * http://en.wikipedia.org/wiki/Viscosity#Dynamic_viscosity. [m^2/s] * * \return The Reynolds Number as calculated from the input parameters */ ... ... @@ -78,13 +79,17 @@ static Scalar reynoldsNumber(const Scalar darcyMagVelocity, * \f[ * \textnormal{Pr}= \frac{\nu}{\alpha} = \frac{c_p \mu}{\lambda}\, , * \f] * with kinematic viscosity\f$\nu\f$, thermal diffusivity \f$\alpha\f$, heat capacity \f$c_p\f$, dynamic viscosity \f$\mu\f$ and thermal conductivity \f$\lambda\f$. * Therefore, Pr is a material specific property (i.e.: not a function of flow directly but only of temperature, pressure and fluid). * with kinematic viscosity\f$\nu\f$, thermal diffusivity \f$\alpha\f$, heat capacity \f$c_p\f$, * dynamic viscosity \f$\mu\f$ and thermal conductivity \f$\lambda\f$. * Therefore, Pr is a material specific property (i.e.: not a function of flow directly * but only of temperature, pressure and fluid). * * source for Prandtl number definition: http://en.wikipedia.org/wiki/Prandtl_number * * \param dynamicViscosity Dynamic (absolute) viscosity over density. http://en.wikipedia.org/wiki/Viscosity#Dynamic_viscosity [m^2/s] * \param heatCapacity Heat capacity at constant pressure. Specifies the energy change for a given temperature change [J / (kg K)] * \param dynamicViscosity Dynamic (absolute) viscosity over density. * http://en.wikipedia.org/wiki/Viscosity#Dynamic_viscosity [m^2/s] * \param heatCapacity Heat capacity at constant pressure. * Specifies the energy change for a given temperature change [J / (kg K)] * \param thermalConductivity Conductivity to heat. Specifies how well matter transfers energy without moving. [W/(m K)] * \return The Prandtl Number as calculated from the input parameters. */ ... ... @@ -122,12 +127,14 @@ struct NusseltFormulation * (packed bed flow as the chemical engineers call it). * * source for Nusselt number definition: http://en.wikipedia.org/wiki/Nusselt_number * source for further empirical correlations for Nusselt Numbers: VDI-Gesellschaft, VDI-Waermeatlas, VDI-Verlag Duesseldorf, 2006 * source for further empirical correlations for Nusselt Numbers: * VDI-Gesellschaft, VDI-Waermeatlas, VDI-Verlag Duesseldorf, 2006 * * \param reynoldsNumber Dimensionless number relating inertial and viscous forces [-]. * \param prandtlNumber Dimensionless number relating viscosity and thermal diffusivity (temperaturleitfaehigkeit) [-]. * \param porosity The fraction of the porous medium which is void space. * \param formulation Switch for deciding which parametrization of the Nusselt number is to be used. Set via the property NusseltFormulation. * \param formulation Switch for deciding which parametrization of the Nusselt number is to be used. * Set via the property NusseltFormulation. * \return The Nusselt number as calculated from the input parameters [-]. */ static Scalar nusseltNumberForced(const Scalar reynoldsNumber, ... ... @@ -136,8 +143,10 @@ static Scalar nusseltNumberForced(const Scalar reynoldsNumber, const int formulation ) { if (formulation == NusseltFormulation::dittusBoelter){ /* example: very common and simple case: flow straight circular pipe, only convection (no boiling), 10000
 ... ... @@ -56,7 +56,8 @@ class IntersectionMapper public: IntersectionMapper(const GridView& gridview) : gridView_(gridview), elementMapper_(gridView_), size_(gridView_.size(1)), intersectionMapGlobal_(gridView_.size(0)), intersectionMapLocal_(gridView_.size(0)) : gridView_(gridview), elementMapper_(gridView_), size_(gridView_.size(1)), intersectionMapGlobal_(gridView_.size(0)), intersectionMapLocal_(gridView_.size(0)) { ElementIterator eIt = gridView_.template begin<0>(); ... ...
 ... ... @@ -499,7 +499,7 @@ int start_(int argc, // instantiate and run the concrete problem TimeManager timeManager; Problem problem(timeManager, GridCreator::grid().leafView()); Problem problem(timeManager, GridCreator::grid().leafGridView()); timeManager.init(problem, restartTime, dt, tEnd, restart); timeManager.run(); // print dumux end message ... ...
 ... ... @@ -60,8 +60,10 @@ NEW_PROP_TAG(SpatialParams); //!< The type of the soil properties object NEW_PROP_TAG(UseMoles); //!Defines whether mole (true) or mass (false) fractions are used NEW_PROP_TAG(ProblemEnableGravity); //!< Returns whether gravity is considered in the problem NEW_PROP_TAG(ImplicitMassUpwindWeight); //!< The default value of the upwind weight NEW_PROP_TAG(ImplicitWithStabilization); //!< Returns whether the stabilization terms are included in the balance equations NEW_PROP_TAG(VtkRockMechanicsSignConvention); //!< Returns whether the output should be written according to rock mechanics sign convention (compressive stresses > 0) //!< Returns whether the stabilization terms are included in the balance equations NEW_PROP_TAG(ImplicitWithStabilization); //!< Returns whether the output should be written according to rock mechanics sign convention (compressive stresses > 0) NEW_PROP_TAG(VtkRockMechanicsSignConvention); } // \} } ... ...
 ... ... @@ -196,7 +196,8 @@ NEW_PROP_TAG(SpatialParams); // coordDir and for each node i and interpolate values at integration point via the shape function vShape. // TODO: evaluation of prevVolVars should also be possible--> check for (size_t i = 0; i < dispSize; i++){ dU_[coordDir] += (elemVolVars[i].primaryVars()[(numEq - dim)+coordDir] - prevSolutionValues[scalarDispLFS.localIndex(i)])*vShape[i]; dU_[coordDir] += (elemVolVars[i].primaryVars()[(numEq - dim)+coordDir] - prevSolutionValues[scalarDispLFS.localIndex(i)])*vShape[i]; } } } ... ...
 ... ... @@ -40,7 +40,9 @@ namespace Dumux { template class ElTwoPLocalResidual: public BoxLocalResidual { protected: typedef typename GET_PROP_TYPE(TypeTag, LocalResidual) Implementation;typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar;typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; typedef typename GET_PROP_TYPE(TypeTag, LocalResidual) Implementation; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; enum { dim = GridView::dimension ... ... @@ -49,7 +51,11 @@ protected: typedef Dune::FieldMatrix DimMatrix; typedef Dune::FieldVector DimVector; typedef typename GET_PROP_TYPE(TypeTag, VolumeVariables) VolumeVariables;typedef typename GET_PROP_TYPE(TypeTag, FluxVariables) FluxVariables;typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables;typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; typedef typename GET_PROP_TYPE(TypeTag, VolumeVariables) VolumeVariables; typedef typename GET_PROP_TYPE(TypeTag, FluxVariables) FluxVariables; typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables; typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables; typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; enum { numFluidPhases = GET_PROP_VALUE(TypeTag, PTAG(NumPhases)) ... ...
 ... ... @@ -67,7 +67,8 @@ NEW_PROP_TAG(GridOperatorSpace); //!< The grid operator space NEW_PROP_TAG(GridOperator); //!< The grid operator space NEW_PROP_TAG(PressureFEM); //!< FE space used for pressure, saturation, ... NEW_PROP_TAG(DisplacementFEM); //!< FE space used for displacement NEW_PROP_TAG(VtkRockMechanicsSignConvention); //!< Returns whether the output should be written according to rock mechanics sign convention (compressive stresses > 0) NEW_PROP_TAG(VtkRockMechanicsSignConvention); //!< Returns whether the output should be written according to //!< rock mechanics sign convention (compressive stresses > 0) //! Specifies the grid function space used for sub-problems NEW_PROP_TAG(GridFunctionSpace); ... ...
 ... ... @@ -89,7 +89,8 @@ std::cout << "rglobal = " << refinePoint << ", rlocal = " << refinePointLocal << } else if (lengthLeft > 0.5) { Scalar nLeftDouble = std::ceil(-log((1.0 + sqrt(1.0 + 4.0*pow(gradingFactors[comp], numElements[comp])*lengthRight/lengthLeft)) Scalar nLeftDouble = std::ceil(-log((1.0 + sqrt(1.0 + 4.0 * pow(gradingFactors[comp], numElements[comp]) * lengthRight/lengthLeft)) /(2.0*pow(gradingFactors[comp], numElements[comp])))/log(gradingFactors[comp])); nLeft = std::min((int)std::ceil(nLeftDouble), numElements[comp]); ... ... @@ -105,7 +106,8 @@ std::cout << "rglobal = " << refinePoint << ", rlocal = " << refinePointLocal << } else { Scalar nRightDouble = -log((1.0 + sqrt(1.0 + 4.0*pow(gradingFactors[comp], numElements[comp])*lengthLeft/lengthRight)) Scalar nRightDouble = -log((1.0 + sqrt(1.0 + 4.0 * pow(gradingFactors[comp], numElements[comp]) * lengthLeft/lengthRight)) /(2.0*pow(gradingFactors[comp], numElements[comp])))/log(gradingFactors[comp]); nRight = std::min((int)std::ceil(nRightDouble), numElements[comp]); ... ... @@ -119,7 +121,8 @@ std::cout << "rglobal = " << refinePoint << ", rlocal = " << refinePointLocal << else hLeft = hRight = 1.0/numElements[comp]; } std::cout << "lengthLeft = " << lengthLeft << ", lengthRight = " << lengthRight << ", hLeft = " << hLeft << ", hRight = " << hRight << ", nLeft = " << nLeft << ", nRight = " << nRight << std::endl; std::cout << "lengthLeft = " << lengthLeft << ", lengthRight = " << lengthRight << ", hLeft = " << hLeft << ", hRight = " << hRight << ", nLeft = " << nLeft << ", nRight = " << nRight << std::endl; int numVertices = numElements[comp] + 1; localPositions[comp].resize(numVertices); ... ...
 ... ... @@ -74,7 +74,8 @@ public: * * The writer needs to be called in postTimeStep(). * * This function puts output variables (TemperaturePhase, Saturation, t, tIndex, ...) over space (1D, over a line) into a text file, * This function puts output variables (TemperaturePhase, Saturation, t, tIndex, ...) * over space (1D, over a line) into a text file, * so they can be read in by another program like matlab. * The file can be found by the extension: dat */ ... ... @@ -142,7 +143,7 @@ public: dataFile << "# This output file was generated from code compiled at " << __TIME__ <<", "<< __DATE__<< "\n"; dataFile << "\n"; dataFile << "# Header\n"; dataFile << "#timestep\t time\t\t \t\t x \t\t y \t\tSw \t\t\t Tw\t\t Tn\t Ts \t xH2On \t xH2OnEquil \t xN2w \txN2wEquil " << std::endl; dataFile << "#timestep\t time\t\t \t\t x \t\t y \t\tSw \t\t\t Tw\t\t Tn\t Ts \t xH2On \t xH2OnEquil \t xN2w \txN2wEquil\n"; dataFile.close(); } ... ...
 ... ... @@ -128,11 +128,9 @@ public: constraints2_ = Dune::make_shared(); scalarGridFunctionSpace1_ = Dune::make_shared(globalProblem_->sdGridView1(), *fem1_, *constraints1_); *fem1_, *constraints1_); scalarGridFunctionSpace2_ = Dune::make_shared(globalProblem_->sdGridView2(), *fem2_, *constraints2_); *fem2_, *constraints2_); // constraints store indices of ghost dofs constraints1_->compute_ghosts(*scalarGridFunctionSpace1_); constraints2_->compute_ghosts(*scalarGridFunctionSpace2_); ... ... @@ -144,8 +142,8 @@ public: gridFunctionSpace2_ = Dune::make_shared(*scalarGridFunctionSpace2_); mdGridFunctionSpace_ = Dune::make_shared(globalProblem_->mdGrid(), *gridFunctionSpace1_, *gridFunctionSpace2_); *gridFunctionSpace1_, *gridFunctionSpace2_); localOperator1_ = Dune::make_shared(sdProblem1_->model()); localOperator2_ = Dune::make_shared(sdProblem2_->model()); ... ... @@ -164,13 +162,15 @@ public: NoDirichletConstraints dirichletVal; auto constraints = Dune::PDELab::MultiDomain::constraints(*mdGridFunctionSpace_, Dune::PDELab::MultiDomain::constrainSubProblem(*mdSubProblem1_,dirichletVal), Dune::PDELab::MultiDomain::constrainSubProblem(*mdSubProblem2_,dirichletVal)); Dune::PDELab::MultiDomain::constrainSubProblem(*mdSubProblem1_, dirichletVal), Dune::PDELab::MultiDomain::constrainSubProblem(*mdSubProblem2_, dirichletVal)); constraints.assemble(*constraintsTrafo_); mdGridOperator_ = Dune::make_shared(*mdGridFunctionSpace_, *mdGridFunctionSpace_, *constraintsTrafo_, *constraintsTrafo_, *mdSubProblem1_, *mdSubProblem2_, *mdCoupling_); *constraintsTrafo_, *constraintsTrafo_, *mdSubProblem1_, *mdSubProblem2_, *mdCoupling_); matrix_ = Dune::make_shared(*mdGridOperator_); *matrix_ = 0; ... ...
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!