﻿ User Guide > Some Common Variations > Computing Integrals

Computing Integrals

Navigation:  User Guide > Some Common Variations >

Computing Integrals   In many cases, it is an integral of some function that is of interest in the solution of a PDE problem.  FlexPDE has an extensive repertoire of integration facilities, including volume integrals, surface integrals on bounding surfaces and line integrals on bounding lines.  The two-dimensional forms are

 • Result = LINE_INTEGRAL(expression, boundary_name)

Computes the integral of expression over the named boundary.

Note: BINTEGRAL is a pseudonym for LINE_INTEGRAL.

 • Result = VOL_INTEGRAL(expression, region_name)

Computes the integral of expression over the named region.

If region_name is omitted, the integral is over the entire domain.

Note: INTEGRAL is a pseudonym for VOL_INTEGRAL.

Note: In 2D Cartesian geometry, AREA_INTEGRAL is also the same as VOL_INTEGRAL, since the domain is assumed to have a unit thickness in Z.

In our example problem, we might define

DEFINITIONS

{ the total flux across 'ring':

(recall that 'ring' is the name of the boundary of 'blob') }

{ the total heat energy in 'blob': }

Tenergy = VOL_INTEGRAL(Phi, 'blob')

In the case of internal boundaries, there is sometimes a different value of the integral on the two sides of the boundary.  The two values can be distinguished by further specifying the region in which the integral is to be evaluated:

{ the total flux across 'ring': }