Ejemplo n.º 1
0
SummaryConfig::SummaryConfig( const Deck& deck, const EclipseState& es , const ParseContext& parseContext)
    : SummaryConfig( deck,
                        *es.getSchedule(),
                        es.get3DProperties(),
                        parseContext,
                        dimensions( *es.getInputGrid() ) )
{}
Ejemplo n.º 2
0
void pressure(const EclipseState& es, const Schedule& /* sched */, data::Solution& sol, size_t /* report_step */, double seconds_elapsed) {
    const auto& grid = es.getInputGrid();
    const auto& units = es.getUnits();
    if (!sol.has("PRESSURE"))
        sol.insert("PRESSURE", UnitSystem::measure::pressure, std::vector<double>(grid.getNumActive()), data::TargetType::RESTART_SOLUTION);

    auto& data = sol.data("PRESSURE");
    std::fill(data.begin(), data.end(), units.to_si(UnitSystem::measure::pressure, seconds_elapsed));
}
Ejemplo n.º 3
0
 Setup( const char* path, const ParseContext& parseContext = ParseContext( )) :
     deck( Parser().parseFile( path, parseContext ) ),
     es( deck, parseContext ),
     grid( es.getInputGrid( ) ),
     schedule( deck, grid, es.get3DProperties(), es.runspec().phases(), parseContext),
     summary_config( deck, schedule, es.getTableManager( ), parseContext)
 {
     auto& io_config = es.getIOConfig();
     io_config.setEclCompatibleRST(false);
 }
Ejemplo n.º 4
0
RestartValue first_sim(const EclipseState& es, EclipseIO& eclWriter, bool write_double) {
    const auto& grid = es.getInputGrid();
    auto num_cells = grid.getNumActive( );

    auto start_time = ecl_util_make_date( 1, 11, 1979 );
    auto first_step = ecl_util_make_date( 10, 10, 2008 );

    auto sol = mkSolution( num_cells );
    auto wells = mkWells();
    RestartValue restart_value(sol, wells);

    eclWriter.writeTimeStep( 1,
                             false,
                             first_step - start_time,
                             restart_value,
			     {}, {}, {}, write_double);

    return restart_value;
}