mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-08 15:33:02 -06:00
Added parameters for controlling use of multidim upwinding.
For now, you will simply get SPU even with use_multidim_upwind=true.
This commit is contained in:
parent
17ffcc77aa
commit
bd013a7d4d
@ -30,8 +30,9 @@ namespace Opm
|
|||||||
|
|
||||||
/// Construct solver.
|
/// Construct solver.
|
||||||
/// \param[in] grid A 2d or 3d grid.
|
/// \param[in] grid A 2d or 3d grid.
|
||||||
TransportModelTracerTof::TransportModelTracerTof(const UnstructuredGrid& grid)
|
TransportModelTracerTof::TransportModelTracerTof(const UnstructuredGrid& grid,
|
||||||
: grid_(grid)
|
const bool use_multidim_upwind)
|
||||||
|
: grid_(grid), use_multidim_upwind_(use_multidim_upwind)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,7 +95,11 @@ namespace Opm
|
|||||||
// Add flux to upwind_term or downwind_flux, if interior.
|
// Add flux to upwind_term or downwind_flux, if interior.
|
||||||
if (other != -1) {
|
if (other != -1) {
|
||||||
if (flux < 0.0) {
|
if (flux < 0.0) {
|
||||||
|
if (use_multidim_upwind_) {
|
||||||
|
upwind_term += flux*multidimUpwindTof(f, other);
|
||||||
|
} else {
|
||||||
upwind_term += flux*tof_[other];
|
upwind_term += flux*tof_[other];
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
downwind_flux += flux;
|
downwind_flux += flux;
|
||||||
}
|
}
|
||||||
@ -117,6 +122,10 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
double TransportModelTracerTof::multidimUpwindTof(const int face, const int upwind_cell) const
|
||||||
|
{
|
||||||
|
// Just SPU for now...
|
||||||
|
return tof_[upwind_cell];
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
@ -43,7 +43,9 @@ namespace Opm
|
|||||||
public:
|
public:
|
||||||
/// Construct solver.
|
/// Construct solver.
|
||||||
/// \param[in] grid A 2d or 3d grid.
|
/// \param[in] grid A 2d or 3d grid.
|
||||||
TransportModelTracerTof(const UnstructuredGrid& grid);
|
/// \param[in] use_multidim_upwind If true, use multidimensional tof upwinding.
|
||||||
|
TransportModelTracerTof(const UnstructuredGrid& grid,
|
||||||
|
const bool use_multidim_upwind = false);
|
||||||
|
|
||||||
/// Solve for time-of-flight.
|
/// Solve for time-of-flight.
|
||||||
/// \param[in] darcyflux Array of signed face fluxes.
|
/// \param[in] darcyflux Array of signed face fluxes.
|
||||||
@ -61,12 +63,15 @@ namespace Opm
|
|||||||
virtual void solveSingleCell(const int cell);
|
virtual void solveSingleCell(const int cell);
|
||||||
virtual void solveMultiCell(const int num_cells, const int* cells);
|
virtual void solveMultiCell(const int num_cells, const int* cells);
|
||||||
|
|
||||||
|
double multidimUpwindTof(const int face, const int upwind_cell) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const UnstructuredGrid& grid_;
|
const UnstructuredGrid& grid_;
|
||||||
const double* darcyflux_; // one flux per grid face
|
const double* darcyflux_; // one flux per grid face
|
||||||
const double* porevolume_; // one volume per cell
|
const double* porevolume_; // one volume per cell
|
||||||
const double* source_; // one volumetric source term per cell
|
const double* source_; // one volumetric source term per cell
|
||||||
double* tof_;
|
double* tof_;
|
||||||
|
bool use_multidim_upwind_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
Loading…
Reference in New Issue
Block a user