ActiveField™ Help

Main QuickField Site     Free Downloads     Contacts

ActiveField Technology
What's New
Objects Overview
Hierarchy Chart
How to Start: Application Object
How to work with Problems
How to work with Model
How to work with Data
How to Analyze Results

Objects

Properties

Methods

Result Object

Properties

Methods

Summary

The calculation results document

Details

The Result is a key object for analyzing the solution results. You get it from the Problem object by the Result property after the AnalyzeResults method was invoked. Formally the Result object is derived from the IDocument object and inherits its methods and properties. But some of IDocument's properties do nothing useful with the Result. So, you cannot save it to disk - there are special methods to export the numerical values or the picture. Other IDocument's properties are still useful. So, the Windows property returns the collection of windows that show the field picture, xy-plot and table.

When the AnalyzeResult method of the Problem object creates Result object it also creates the first FieldWindow showing the field picture with default settings. You can get it as a member of the Windows collection associated with the Result. Every time you create a new window for analyzing results it becomes a member of the Windows collection.

The collection Windows in general case contains different types of windows. The GetFieldWindow method provides more convenient alternative for getting a field picture window. It receives the numerical parameter index which defines the serial number of the field picture window, starting from one. In most cases this value will be equal to one.

Many result analyzing functions require a Contour. This belongs to the FieldWindow, so if you need to have several contours simultaneously you can create several FieldWindow objects and build the contour in each of them.

During the result analysis of the problems solved with the electric circuit connected, current and voltage data for every electric circuit element are provided. The CircuitResult is a key object in this context. The CircuitResult object represents a part of the solution results which contains currents and voltages in the electric circuit components. Access to the CircuitResult object is provided by the similarly named CircuitResult property of the Result object.

In addition to generic properties of the IDocument, the Result object provides the following methods:

GetLocalValues method

Returns local field quantities for the given point as FieldPoint (or its derivative).

GetIntegral method

Returns the integral quantity value as Quantity object. Integration is done over the given Contour.

GetCustomIntegral method

Returns the user defined integral quantity value as Quantity object. Integration is done over the line, surface, or volume given by the Contour parameter. Integration function, implemented as an object of UserFunction interface, should be provided by the user.

GetCustomIntegralTotal method

Returns the user defined integral quantity value as Quantity object. Integration is performed over the surface (volume) which corresponds to the whole calculation region. Integration function, implemented as an object of UserFunction interface, should be provided by the user.

GetXYPlot method

Creates and returns the XYPlotWindow that shows the xy-plot along the given Contour.

GetTable method

Creates and returns the TableWindow that tabulated the field values along the given Contour.

For Transient Problems

Time property
as Double

Gets and sets the specific time layer of the transient problem that is currently analyzed. Initially the very first stored time layer becomes current.

TimesArray property
as array of Double

Gets an array of all time values available in the results file.

GetTimePlot method
as TimePlotWindow

Creates a new or returns an already opened time plot window.

GetTimeTable method
as TimeTableWindow

Creates a new or returns an already opened time table window.

The following example demonstrates using of methods and properties for transient problem. There we set the final time layer, then open and tune the time plot, and finally opens the time dependency table for the point (10, 20), select desired rows and put them into Windows clipboard.

Sub SeeResults(res As QuickField.Result)
    Dim times() As Double
    times = res.TimesArray
    res.Time = times(UBound(times))    ' Set the last time layer as current
   
    ' Create a new time plot
    Dim timeView As QuickField.TimePlotWindow
    Set timeView = res.GetTimePlot
    Dim tsSet As QuickField.TimePlotPicture
    ' Add two points to the plot
    '     and tune the range of time-axis

    Set tsSet = timeView.PlotSettings
    With tsSet
        .GridLines = False
        .Markers = False
        .Group = qfGrad
        ' Set the range of time axis:
        .RangeX(qfMin) = 6.5
        .RangeX(qfMax) = 10
       
        ' Add two points and choose desired curves for each of them
        Dim p As QuickField.TimePlotPoint
        Set p = .Points.Add(QF.PointXY(0, 0))
        p.curve(qfPotential) = True
        p.curve(qfGrad) = True
        p.curve(qfGradX) = True

        Set p = .Points.Add(QF.PointXY(0, 70))
        p.curve(qfPotential) = True
        p.curve(qfGrad) = True
        p.curve(qfGradY) = True
    End With
    timeView.PlotSettings = tsSet    ' Apply settings to the time plot

    ' Create the time dependency table
    Dim timeTable As QuickField.TimeTableWindow
    Set timeTable = res.GetTimeTable(QF.PointXY(10, 20))
    ' Select rows by its time value
    '    alternatively we could select rows by number
    timeTable.Select 6#, 11#
    ' Copy text to the Windows clipboard -
    '     now data can be pasted to any program, say Microsoft Excel

    timeTable.GetData

    ' Clean up
    timeTable.Close
    timeView.Close
End Sub