Пример #1
0
//--------------------------------------------------------------------------------------------------
/// 
//--------------------------------------------------------------------------------------------------
QString RimWellLogExtractionCurve::createCurveAutoName()
{
    RimGeoMechCase* geomCase = dynamic_cast<RimGeoMechCase*>(m_case.value());
    RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>(m_case.value());
    
    QStringList generatedCurveName;

    if (m_addWellNameToCurveName)
    {
        if (!wellName().isEmpty())
        {
            generatedCurveName += wellName();
            if (m_trajectoryType == SIMULATION_WELL && simulationWellBranches().size() > 1)
            {
                generatedCurveName.push_back(" Br" + QString::number(m_branchIndex + 1));
            }
        }
    }

    if (m_addCaseNameToCurveName && m_case())
    {
        generatedCurveName.push_back(m_case->caseUserDescription());
    }

    if (m_addPropertyToCurveName && !wellLogChannelName().isEmpty())
    {
        generatedCurveName.push_back(wellLogChannelName());
    }

    if (m_addTimestepToCurveName || m_addDateToCurveName)
    {
        size_t maxTimeStep = 0;

        if (eclipseCase)
        {
            if (eclipseCase->eclipseCaseData())
            {
                maxTimeStep = eclipseCase->eclipseCaseData()->results(m_eclipseResultDefinition->porosityModel())->maxTimeStepCount();
            }
        }
        else if (geomCase)
        {
            if (geomCase->geoMechData())
            {
                maxTimeStep = geomCase->geoMechData()->femPartResults()->frameCount();
            }
        }

        if (m_addDateToCurveName)
        {
            QString dateString = wellDate();
            if (!dateString.isEmpty())
            {
                generatedCurveName.push_back(dateString);
            }
        }

        if (m_addTimestepToCurveName)
        {
            generatedCurveName.push_back(QString("[%1/%2]").arg(m_timeStep()).arg(maxTimeStep));
        }
    }

    return generatedCurveName.join(", ");
}
Пример #2
0
//--------------------------------------------------------------------------------------------------
/// 
//--------------------------------------------------------------------------------------------------
int RimWellLogExtractionCurve::currentTimeStep() const
{
    return m_timeStep();
}
Пример #3
0
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString Rim3dWellLogExtractionCurve::createCurveAutoName() const
{
    RimGeoMechCase* geomCase = dynamic_cast<RimGeoMechCase*>(m_case.value());
    RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>(m_case.value());

    QStringList generatedCurveName;
    
    if (m_nameConfig->addWellName())
    {
        RimWellPath* wellPath;
        this->firstAncestorOrThisOfTypeAsserted(wellPath);
        if (!wellPath->name().isEmpty())
        {
            generatedCurveName += wellPath->name();
        }
    }

    if (m_nameConfig->addCaseName() && m_case())
    {
        generatedCurveName.push_back(m_case->caseUserDescription());
    }

    if (m_nameConfig->addProperty() && !resultPropertyString().isEmpty())
    {
        generatedCurveName.push_back(resultPropertyString());
    }

    if (m_nameConfig->addTimeStep() || m_nameConfig->addDate())
    {
        size_t maxTimeStep = 0;

        if (eclipseCase)
        {
            RigEclipseCaseData* data = eclipseCase->eclipseCaseData();
            if (data)
            {
                maxTimeStep = data->results(m_eclipseResultDefinition->porosityModel())->maxTimeStepCount();
            }
        }
        else if (geomCase)
        {
            RigGeoMechCaseData* data = geomCase->geoMechData();
            if (data)
            {
                maxTimeStep = data->femPartResults()->frameCount();
            }
        }

        if (m_nameConfig->addDate())
        {
            QString dateString = wellDate();
            if (!dateString.isEmpty())
            {
                generatedCurveName.push_back(dateString);
            }
        }

        if (m_nameConfig->addTimeStep())
        {
            generatedCurveName.push_back(QString("[%1/%2]").arg(m_timeStep()).arg(maxTimeStep));
        }
    }

    return generatedCurveName.join(", ");
}