GeoStudio Add-Ins Upgrade Guide
GeoStudio Add-Ins Upgrade Guide
2
Table of Contents
1 Overview..................................................................4
3
1 Overview
GeoStudio 2018 represents a major release of the GeoStudio Finite Element solver, with a
number of changes that will affect existing Add-Ins built for GeoStudio versions prior to
GeoStudio 2018. Existing Add-Ins will not work as is and will require upgrading due to changes
to the Add-In APIs and how Add-In code is compiled.
This document provides Add-In developers with an overview of what has changed, and
instructions to upgrade them for GeoStudio 2018.
4
2.3 Updating Add-in Code for the New API
Several API changes have occurred in GeoStudio 2018 which will break old add-ins. To compile
them against the new assembly successfully, you may be required to make several changes.
5
{
Comment [AP]: I added this to the
case Gsi.ResultType.Nodes:
sample code as Ron Coutts had some
case Gsi.ResultType.Gauss:
initial problems with understanding that
case Gsi.ResultType.Elements:
the Add-In may be called from the UI (on-
case Gsi.ResultType.ElementNodes:
demand) without a result context which
contextId = Gsi.ResultContext.ID();
throws an exception
elevation = GetParam(Gsi.DataParamType.eElevation);
break; Comment [AP]: Ron had problems
understanding why the Add-In was being
default: called more than once within a timestep,
// Catch cases of unexpected context and it was due to the integration.
break;
}
}
catch
{
// Catch cases of invalid GetParam or
// missing Result Context Type (Add-In is called
// from UI when painting boundary conditions)
// Return a max double value to indicate the problem
return Double.MaxValue;
}
return elevation * pressure;
}
}
6
1. If the Add-In simply returns an instantaneous value based on the input time, say the Comment [AP]: I deleted this section as
Water Rate at time x, then it is a straightforward calculation that can be invoked for any we now support custom parameters
input time value.
2. If the Add-In has additional functionality, for example accumulating the Water Mass at
each time step, then it will be necessary to enclose the accumulation logic in conditional
code to make sure it is only called at the time step (and not at the various integration
points between previous and current time step)
Note that even though an Add-In may be called multiple times within a time step for integration
purposes, the overall time spent invoking the Add-In is still a small fraction of the total solve
time.
Version 8 Version 9
eTotalHead eWaterTotalHead
ePressureHead eWaterPressureHead
eXGradient eWaterGradientX
eYGradient eWaterGradientY
eXYGradient eWaterGradient
eXConductivity eWaterConductivityX
eYConductivity eWaterConductivityY
ePWP eWaterPressure
eXThermalUnitFlux eHeatFluxX
7
eYThermalUnitFlux eHeatFluxY
eXYThermalUnitFlux eHeatFlux
eXLiqVel eWaterFluxX
eYLiqVel eWaterFluxY
eXYLiqVel eWaterFlux
eXVapVel eVapourFluxX
eYVapVel eVapourFluxY
eXYVapVel eVapourFlux
eAirHead eAirTotalHead
eAirFlux eAirMassRate
eAirCumFlux eAirCumulativeMass
eAirXVelocity eAirFluxX
eAirYVelocity eAirFluxY
eAirXYVelocity eAirFlux
eAirXGradient eAirGradientX
eAirYGradient eAirGradientY
eAirXYGradient eAirGradient
eAirXConductivity eAirConductivityX
eAirYConductivity eAirConductivityY
eAirContent eAirConductivity
8
eWaterFlux eWaterRate
eWaterCumFlux eWaterCumulativeVolume
eThermalFlux eHeatRate
eThermalCumFlux eHeatCumulativeTransfer
eGasFlux eGasRate
eMassFlux eSoluteMassRate
eMassCumFlux eSoluteCumulativeMass
eXThermalGradient eThermalGradientX
eYThermalGradient eThermalGradientY
eXYThermalGradient eThermalGradient
e1DGaussID eBeamGaussNum
eWaterUnitFlux eWaterFlux
eMassUnitFlux eSoluteMassFlux
eSourceConcentration eConcentration
eRootDepth eRootDepthMagnitude
eGasUnitFlux eGasFlux
eAirCumVolFlux eAirCumulativeVolume
eAirVolFlux eAirRate
eElementNumFromGauss2D eParentElementId
eLocalRgnFromGauss2D eRelativeId
9
eXFinalConductivity eWaterPrevIterConductivityX
eAirUnitFlux eAirFlux
eAirIterations eAirIterationCount
eHeatIterations eHeatIterationCount
eWaterIterations eWaterIterationCount
eLambdaWaterCoupledAir eWaterCoupledAirLambda
eLambdaWaterCoupledHeat eWaterCoupledHeatLambda
eLambdaAirCoupledHeat eAirCoupledHeatLambda
eLambdaAirCoupledWater eAirCoupledWaterLambda
eStoredHeadForcing eHeatStoredForcing
eStoredWaterForcing eWaterStoredForcing
eStoredAirForcing eAirStoredForcing
eStoredSoluteForcing eSoluteStoredForcing
eSoluteIterations eSoluteIterationCount
eGasIterations eGasIterationCount
eStoredGasForcing eGasStoredForcing
eDissolvedGasConcentration eGasDissolvedConcentration
eDissolvedGasXXDispersionCoef eGasDissolvedXXDispersiveCoef
eDissolvedGasYYDispersionCoef eGasDissolvedYYDispersiveCoef
eDissolvedGasXYDispersionCoef eGasDissolvedXYDispersionCoef
10
eDissolvedGasPeclet eGasDissolvedPeclet
eDissolvedGasCourant eGasDissolvedCourant
eDissolvedGasPecletX eGasDissolvedPecletX
eDissolvedGasPecletY eGasDissolvedPecletY
eDissolvedGasCourantX eGasDissolvedCourantX
eDissolvedGasCourantY eGasDissolveCourantY
eDissolvedGasDiffCoeff eGasDissolvedDiffusionCoefficient
11