Kratos Structure: Node and Nodal Data

From KratosWiki
Revision as of 11:38, 5 May 2012 by Jcotela (Talk | contribs)
Jump to: navigation, search

One of the most basic classes is the Node. In this section, we will briefly present its implementation, which will will allow us to present some basic concepts in Kratos.

The Node

The Node class centralizes the information related to a single point in the finite element mesh. In its core, the node class contains an index (Id) that uniquely identifies the node in the finite element mesh, and the geometrical information about the position of the node, which is stored as a Point instance. This basic structure is common to all nodes used in Kartos, and can be accessed and modified from Python using the following interface

node.Id   # Unique identifier for the node. An unsigned integer value, starting from 1
node.X    # X coordinate of the current position of the node
node.Y    # Y coordinate
node.Z    # Z coordinate

In addition, the original position of the node is also stored, which is useful in Lagrangian or ALE (Arbitrary Lagrangian-Eulerian) formulations:

node.X0   # Original X coordinate
node.Y0   # Original Y coordinate
node.Z0   # Original Z coordinate

Nodal Data

The node class is also responsible for managing the information related to that point of the mesh and, in particular, of the values of the problem data and unknowns at that point of the mesh. In Kratos, all such data is associated to a Variable, which typically identifies a phyisical magnitude such as velocity or temperature. For example, a node in a fluid problem could be required to store the following data:

Node 735
 Velocity: An unknown of the problem, 3D vector.
 Pressure: An unknown of the problem, scalar.
 Density: Problem data, given as input, scalar.
 Viscosity: Problem data, given as input, scalar.
 Body force: Problem data (for example, acceleration of gravity), given as input, 3D vector.

In Kratos, all variables are identified by a label, typically their name in uppercase (VELOCITY,PRESSURE). In the case of vectors, individual components can be also recovered explicitly so, for example, instead of asking for VELOCITY, we can inquire a node about VELOCITY_X, VELOCITY_Y or VELOCITY_Z.

Personal tools