mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Whitespace cleanup.
This commit is contained in:
parent
96327164cc
commit
e96421dbd7
@ -48,39 +48,39 @@ namespace Opm
|
|||||||
void computeInjectedProduced(const BlackoilPropertiesInterface& props,
|
void computeInjectedProduced(const BlackoilPropertiesInterface& props,
|
||||||
const std::vector<double>& press,
|
const std::vector<double>& press,
|
||||||
const std::vector<double>& z,
|
const std::vector<double>& z,
|
||||||
const std::vector<double>& s,
|
const std::vector<double>& s,
|
||||||
const std::vector<double>& src,
|
const std::vector<double>& src,
|
||||||
const double dt,
|
const double dt,
|
||||||
double* injected,
|
double* injected,
|
||||||
double* produced)
|
double* produced)
|
||||||
{
|
{
|
||||||
const int num_cells = src.size();
|
const int num_cells = src.size();
|
||||||
const int np = s.size()/src.size();
|
const int np = s.size()/src.size();
|
||||||
if (int(s.size()) != num_cells*np) {
|
if (int(s.size()) != num_cells*np) {
|
||||||
THROW("Sizes of s and src vectors do not match.");
|
THROW("Sizes of s and src vectors do not match.");
|
||||||
}
|
}
|
||||||
std::fill(injected, injected + np, 0.0);
|
std::fill(injected, injected + np, 0.0);
|
||||||
std::fill(produced, produced + np, 0.0);
|
std::fill(produced, produced + np, 0.0);
|
||||||
std::vector<double> visc(np);
|
std::vector<double> visc(np);
|
||||||
std::vector<double> mob(np);
|
std::vector<double> mob(np);
|
||||||
for (int c = 0; c < num_cells; ++c) {
|
for (int c = 0; c < num_cells; ++c) {
|
||||||
if (src[c] > 0.0) {
|
if (src[c] > 0.0) {
|
||||||
injected[0] += src[c]*dt;
|
injected[0] += src[c]*dt;
|
||||||
} else if (src[c] < 0.0) {
|
} else if (src[c] < 0.0) {
|
||||||
const double flux = -src[c]*dt;
|
const double flux = -src[c]*dt;
|
||||||
const double* sat = &s[np*c];
|
const double* sat = &s[np*c];
|
||||||
props.relperm(1, sat, &c, &mob[0], 0);
|
props.relperm(1, sat, &c, &mob[0], 0);
|
||||||
props.viscosity(1, &press[c], &z[np*c], &c, &visc[0], 0);
|
props.viscosity(1, &press[c], &z[np*c], &c, &visc[0], 0);
|
||||||
double totmob = 0.0;
|
double totmob = 0.0;
|
||||||
for (int p = 0; p < np; ++p) {
|
for (int p = 0; p < np; ++p) {
|
||||||
mob[p] /= visc[p];
|
mob[p] /= visc[p];
|
||||||
totmob += mob[p];
|
totmob += mob[p];
|
||||||
}
|
}
|
||||||
for (int p = 0; p < np; ++p) {
|
for (int p = 0; p < np; ++p) {
|
||||||
produced[p] += (mob[p]/totmob)*flux;
|
produced[p] += (mob[p]/totmob)*flux;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -93,11 +93,11 @@ namespace Opm
|
|||||||
/// @param[in] s saturation values (for all phases)
|
/// @param[in] s saturation values (for all phases)
|
||||||
/// @param[out] totmob total mobilities.
|
/// @param[out] totmob total mobilities.
|
||||||
void computeTotalMobility(const Opm::BlackoilPropertiesInterface& props,
|
void computeTotalMobility(const Opm::BlackoilPropertiesInterface& props,
|
||||||
const std::vector<int>& cells,
|
const std::vector<int>& cells,
|
||||||
const std::vector<double>& press,
|
const std::vector<double>& press,
|
||||||
const std::vector<double>& z,
|
const std::vector<double>& z,
|
||||||
const std::vector<double>& s,
|
const std::vector<double>& s,
|
||||||
std::vector<double>& totmob)
|
std::vector<double>& totmob)
|
||||||
{
|
{
|
||||||
std::vector<double> pmobc;
|
std::vector<double> pmobc;
|
||||||
|
|
||||||
@ -126,12 +126,12 @@ namespace Opm
|
|||||||
/// @param[out] totmob total mobility
|
/// @param[out] totmob total mobility
|
||||||
/// @param[out] omega fractional-flow weighted fluid densities.
|
/// @param[out] omega fractional-flow weighted fluid densities.
|
||||||
void computeTotalMobilityOmega(const Opm::BlackoilPropertiesInterface& props,
|
void computeTotalMobilityOmega(const Opm::BlackoilPropertiesInterface& props,
|
||||||
const std::vector<int>& cells,
|
const std::vector<int>& cells,
|
||||||
const std::vector<double>& p,
|
const std::vector<double>& p,
|
||||||
const std::vector<double>& z,
|
const std::vector<double>& z,
|
||||||
const std::vector<double>& s,
|
const std::vector<double>& s,
|
||||||
std::vector<double>& totmob,
|
std::vector<double>& totmob,
|
||||||
std::vector<double>& omega)
|
std::vector<double>& omega)
|
||||||
{
|
{
|
||||||
std::vector<double> pmobc;
|
std::vector<double> pmobc;
|
||||||
|
|
||||||
@ -185,10 +185,10 @@ namespace Opm
|
|||||||
props.relperm(nc, &s[0], &cells[0],
|
props.relperm(nc, &s[0], &cells[0],
|
||||||
&pmobc[0], dpmobc);
|
&pmobc[0], dpmobc);
|
||||||
|
|
||||||
std::transform(pmobc.begin(), pmobc.end(),
|
std::transform(pmobc.begin(), pmobc.end(),
|
||||||
mu.begin(),
|
mu.begin(),
|
||||||
pmobc.begin(),
|
pmobc.begin(),
|
||||||
std::divides<double>());
|
std::divides<double>());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Computes the fractional flow for each cell in the cells argument
|
/// Computes the fractional flow for each cell in the cells argument
|
||||||
|
@ -46,11 +46,11 @@ namespace Opm
|
|||||||
void computeInjectedProduced(const BlackoilPropertiesInterface& props,
|
void computeInjectedProduced(const BlackoilPropertiesInterface& props,
|
||||||
const std::vector<double>& p,
|
const std::vector<double>& p,
|
||||||
const std::vector<double>& z,
|
const std::vector<double>& z,
|
||||||
const std::vector<double>& s,
|
const std::vector<double>& s,
|
||||||
const std::vector<double>& src,
|
const std::vector<double>& src,
|
||||||
const double dt,
|
const double dt,
|
||||||
double* injected,
|
double* injected,
|
||||||
double* produced);
|
double* produced);
|
||||||
|
|
||||||
/// @brief Computes total mobility for a set of saturation values.
|
/// @brief Computes total mobility for a set of saturation values.
|
||||||
/// @param[in] props rock and fluid properties
|
/// @param[in] props rock and fluid properties
|
||||||
@ -60,11 +60,11 @@ namespace Opm
|
|||||||
/// @param[in] s saturation values (for all phases)
|
/// @param[in] s saturation values (for all phases)
|
||||||
/// @param[out] totmob total mobilities.
|
/// @param[out] totmob total mobilities.
|
||||||
void computeTotalMobility(const Opm::BlackoilPropertiesInterface& props,
|
void computeTotalMobility(const Opm::BlackoilPropertiesInterface& props,
|
||||||
const std::vector<int>& cells,
|
const std::vector<int>& cells,
|
||||||
const std::vector<double>& p,
|
const std::vector<double>& p,
|
||||||
const std::vector<double>& z,
|
const std::vector<double>& z,
|
||||||
const std::vector<double>& s,
|
const std::vector<double>& s,
|
||||||
std::vector<double>& totmob);
|
std::vector<double>& totmob);
|
||||||
|
|
||||||
/// @brief Computes total mobility and omega for a set of saturation values.
|
/// @brief Computes total mobility and omega for a set of saturation values.
|
||||||
/// @param[in] props rock and fluid properties
|
/// @param[in] props rock and fluid properties
|
||||||
@ -75,12 +75,12 @@ namespace Opm
|
|||||||
/// @param[out] totmob total mobility
|
/// @param[out] totmob total mobility
|
||||||
/// @param[out] omega fractional-flow weighted fluid densities.
|
/// @param[out] omega fractional-flow weighted fluid densities.
|
||||||
void computeTotalMobilityOmega(const Opm::BlackoilPropertiesInterface& props,
|
void computeTotalMobilityOmega(const Opm::BlackoilPropertiesInterface& props,
|
||||||
const std::vector<int>& cells,
|
const std::vector<int>& cells,
|
||||||
const std::vector<double>& p,
|
const std::vector<double>& p,
|
||||||
const std::vector<double>& z,
|
const std::vector<double>& z,
|
||||||
const std::vector<double>& s,
|
const std::vector<double>& s,
|
||||||
std::vector<double>& totmob,
|
std::vector<double>& totmob,
|
||||||
std::vector<double>& omega);
|
std::vector<double>& omega);
|
||||||
|
|
||||||
|
|
||||||
/// @brief Computes phase mobilities for a set of saturation values.
|
/// @brief Computes phase mobilities for a set of saturation values.
|
||||||
@ -96,7 +96,7 @@ namespace Opm
|
|||||||
const std::vector<double>& z,
|
const std::vector<double>& z,
|
||||||
const std::vector<double>& s,
|
const std::vector<double>& s,
|
||||||
std::vector<double>& pmobc);
|
std::vector<double>& pmobc);
|
||||||
|
|
||||||
|
|
||||||
/// Computes the fractional flow for each cell in the cells argument
|
/// Computes the fractional flow for each cell in the cells argument
|
||||||
/// @param[in] props rock and fluid properties
|
/// @param[in] props rock and fluid properties
|
||||||
|
Loading…
Reference in New Issue
Block a user