Commit 4eb741ae authored by Holger Class's avatar Holger Class

made it running again

parent 41a0f71f
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*****************************************************************************
* Copyright (C) 2011 by Holger Class *
* Institute for Modelling Hydraulic and Environmental Systems *
* University of Stuttgart, Germany *
* email: <givenname>.<name>@iws.uni-stuttgart.de *
* See the file COPYING for full copying permissions. *
* *
* This program 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 2 of the License, or *
* (at your option) any later vesion. *
* (at your option) any later version. *
* *
* This program 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 *
* 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 *
......@@ -26,6 +23,12 @@
* is injected into a fully water saturated medium with a residually
* trapped NAPL contamination.
*/
// THIS IS THE SAME EXAMPLE BUT ONLY 0.3m AND WITH DIRICHLET CONDITION
// LIKE INITIAL, WHICH MEANS, WE CANNOT REALLY MODEL THE OUTFLOW AT
// THE BOTTOM, SINCE THE SATURATION CANNOT CHANGE
#ifndef DUMUX_COLUMNXYLENEPROBLEM_HH
#define DUMUX_COLUMNXYLENEPROBLEM_HH
......@@ -34,8 +37,6 @@
#include <dumux/porousmediumflow/3p3c/implicit/model.hh>
#include <dumux/porousmediumflow/implicit/problem.hh>
//#include <dumux/common/deprecated.hh>
#include "columnxylenespatialparams2.hh"
#define ISOTHERMAL 0
......@@ -53,21 +54,18 @@ NEW_TYPE_TAG(ColumnProblem, INHERITS_FROM(BoxThreePThreeCNI, ColumnSpatialParams
SET_TYPE_PROP(ColumnProblem, Grid, Dune::YaspGrid<2>);
// Set the problem property
SET_PROP(ColumnProblem, Problem,Dumux::ColumnProblem<TypeTag>);
SET_TYPE_PROP(ColumnProblem, Problem, ColumnProblem<TypeTag>);
// Set the fluid system
SET_TYPE_PROP(ColumnProblem,
FluidSystem,
Dumux::FluidSystems::H2OAirXylene<typename GET_PROP_TYPE(TypeTag, Scalar)>);
FluidSystems::H2OAirXylene<typename GET_PROP_TYPE(TypeTag, Scalar)>);
// Enable gravity
SET_BOOL_PROP(ColumnProblem, ProblemEnableGravity, true);
// Maximum tolerated relative error in the Newton method
SET_SCALAR_PROP(ColumnProblem, NewtonMaxRelativeShift, 1e-4);
// Set the maximum time step
SET_SCALAR_PROP(ColumnProblem, TimeManagerMaxTimeStepSize, 1.);
}
......@@ -167,12 +165,9 @@ public:
{
const GlobalPosition globalPos = vertex.geometry().center();
if(globalPos[1] < eps_) {
values.setOutflow(Indices::contiWEqIdx);
values.setOutflow(Indices::energyEqIdx);
values.setDirichlet(Indices::pressureIdx, Indices::contiGEqIdx);
values.setOutflow(Indices::contiNEqIdx);
} else
if(globalPos[1] < eps_)
values.setAllDirichlet();
else
values.setAllNeumann();
}
......@@ -206,7 +201,6 @@ public:
* For this method, the \a values parameter stores the mass flux
* in normal direction of each phase. Negative values mean influx.
*/
void neumann(PrimaryVariables &values,
const Element &element,
const FVElementGeometry &fvElemGeom,
......@@ -222,7 +216,7 @@ public:
{
values[Indices::contiWEqIdx] = GET_RUNTIME_PARAM(TypeTag, Scalar, steamFlux);
values[Indices::contiGEqIdx] = -0.000001;
values[Indices::contiNEqIdx] = -0.000001;
values[Indices::contiNEqIdx] = -0.00;
values[Indices::energyEqIdx] = GET_RUNTIME_PARAM(TypeTag, Scalar, enthalpyFlux);
}
}
......@@ -271,9 +265,22 @@ public:
}
bool shouldWriteRestartFile() const
{
return 0;
}
{
return 0;
}
bool shouldWriteOutput() const
{
int outputInterval = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, int, TimeManager, OutputInterval);
return (this->timeManager().timeStepIndex() % outputInterval == 0 ||
this->timeManager().willBeFinished());
}
private:
// internal method for the initial condition (reused for the
......@@ -281,17 +288,17 @@ private:
void initial_(PrimaryVariables &values,
const GlobalPosition &globalPos) const
{
Scalar y = globalPos[1];
const Scalar y = globalPos[1];
values[temperatureIdx] = 296.15;
values[pressureIdx] = 1.e5;
if(y > 0.3-eps_){
if(y > 0.3 - eps_){
values[switch2Idx] = 0.112; // almost no contaminant component
values[switch1Idx] = 0.005;
} else {
values[switch1Idx] = 0.005;
if((y<0.3-0.001+eps_) &&(y>0.3-0.0148-eps_)) values[switch2Idx] = 0+((0.3-y)/0.0148)*0.112;
if((y<0.3-0.001+eps_)&&(y>0.3-0.0148-eps_)) values[switch2Idx] = 0+((0.3-y)/0.0148)*0.112;
if((y<0.3-0.0148-eps_)&&(y>0.3-0.0296-eps_)) values[switch2Idx] = 0.112+(((0.3-y)-0.0148)/0.0148)*(0.120-0.112);
if((y<0.3-0.0296-eps_)&&(y>0.3-0.0444-eps_)) values[switch2Idx] = 0.120+(((0.3-y)-0.0296)/0.0148)*(0.125-0.120);
if((y<0.3-0.0444-eps_)&&(y>0.3-0.0592-eps_)) values[switch2Idx] = 0.125+(((0.3-y)-0.0444)/0.0148)*(0.137-0.125);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment