External Field#

External Field = <char_string1> {char_string2} <file_name> [char_string_3]

Description / Usage#

This optional card format provides a mechanism for reading-in nodal field variables stored in an EXODUS II file. Each field variable is specified on a separate input card, with the following input parameters:

<char_string1>

Name of the nodal field to be read; it should correspond to a nodal variable name in the EXODUS II file.

{char_string2}

Two- to eight-character value that identifies the type of interpolation to be applied to the external variable field. Possible values are as follows:

  • Q1 - Linear

  • Q2 - Quadratic

  • Q2_LSA - Special quadratic for 3D analysis of 2D LSA

  • Q1_D - Linear with special surface dofs

  • Q2_D - Quadratic with special surface dofs

  • Q2_D_LSA - Special quadratic discontinuous for 3D

    analysis of 2D LSA

  • PQ1 - Bilinear discontinuous

  • PQ2 - Biquadratic discontinuous

  • P0 - Piecewise constant

  • Pl - Piecewise linear

  • SP - Subparametric; linear on interior,

    quadratic on surface

<file_name>

Name of the EXODUS II file from which the nodal field is to be read. When Goma is compiled with LIBRARY_MODE defined (see Appendix 2) and the external field will be passed into Goma from a driver code, this entry will be either IMPORT (for nodal variables) or IMPORT_EV (for element variables), instead of a file name.

[char_string3]

Optional character string. Only optional available is “timedependent” which enables nodal variables to be interpolated to the current time step. This option is useful for transient coupling, viz. a case in which a transient field variable is used to drive a time-dependent simulation. A good example of this is a transient current density field from a electromagnetics calculation being used to drive a transient thermal calculation with Joule heating.

Examples#

The first example:

External Field = VX Q2 velocity.exoII
External Field = VY Q2 velocity.exoII

The second example:

External Field = JX_FIELD Q2 fields.exoII
External Field = JY_FIELD Q2 fields.exoII
External Field = BTHETA_FIELD Q2 fields.exoII

The third example:

External Field = DMX Q1 IMPORT
External Field = DMY Q1 IMPORT
External Field = P_POR Q1 IMPORT_EV

The fourth example:

External Field = JE_N_1 Q1 emfields.exoII time_dependent

Technical Discussion#

The field variables read into Goma from the Example cards can be accessed in any user-defined subroutine.

In the case of variables named VX, VY, or VZ, these fields are automatically loaded to the appropriate velocity component so they can be used in an advection-diffusion analysis, i.e., VX, VY, VZ are reserved names for <char_string1> and a user-defined routine is not required. Thus the variables for the two fields, “VX” and “VY”, read from the file named “velocity.exoII” in the first example above, would be automatically accessed when the advection term is left on in the energy or species_bulk equation cards. In other words, without solving the momentum equations, one can access an external velocity field for advection-diffusion problems. These variables would have quadratic interpolation (Q2) applied to the velocity values read.

The three cards in the second example can be used to read two components of a current density field (JX_FIELD, JY_FIELD), and the azimuthal component of a magnetic field (BTHETA_FIELD) from the file “fields.exoII” (generated by some other analysis code). These fields are then accessed in the user-defined subroutines as

fv->external_field[0], fv->external_field[1], and fv->external_field[2],

respectively, as an interpolated value at an integration point. NOTE that these fields are brought in as a part of the BOUSS_JXB_FORCE on the Navier Stokes source card. These are to be distinguished from the electromagnetic fields in the fourth example which correspond to Solid Momentum Source models.

Note that the number of field variables read from the EXODUS II file must not exceed the value MAX_EXTERNAL_FIELD set in the include file rf_fem_const.h. Should that occur, a new version of Goma must be compiled with an increased value of MAX_EXTERNAL_FIELD. The user should consult notes on building Goma if (s)he has questions regarding how to do this.

The third example assumes that Goma has been compiled with LIBRARY_MODE and is linked in to an external driver code along with another program which will compute some variables and pass their values into Goma; here the imported fields are the X and Y components of mesh displacement (nodal variables) and porosity (an element variable). There is a naive first order interpolation function in Goma to obtain nodal values of fields which are imported as element variables. Although Goma does not solve for these variables, their values are included in the output Exodus file.

In the fourth example a field JE_N_1, the x-directed current density field, timedependent, is brought in from emfields.exoII. Typically, depending on the dimension of the problem, additional fields JE_N_2, JE_N_3 are also brought in as current density is a e. These fields are part of the JXB Solid Momentum Source model, together with the magnetic nodal field quantities, BE_N_1, BE_N_2, and BE_N_3.

Several other standard external fields variables are supported in GOMA. Namely:

FVP11, FVP22, etc. These fields are useful for the elastoviscoplasticity model. Please consult GOMA tutorial GT-019.2 for more details.

SAT, HEIGHT, PERM, CROSS_PERM, SH_SAT_CL_POROSITY, etc. These are specially designated external fields which are mapped to variations in these properties corresponding to thin porous media. Please see GT-038.

References#

GT-019.2. Elastoviscoplastic (EVP) Consitutive Model in GOMA: Theory, Testing, and Tutorial, P. R. Schunk, A. Sun, S. Y. Tam, and K. S. Chen. Memo to Distribution. March 13, 2003.

GT-038.0: Pixel-to-Mesh Tool Tutorial for GOMA. P R. Schunk, Memo to distribution, 10 November 2009.