Standard Database Nodes
The custom user panels may access and update any parameter in the database.
If these parameters are the standard ones, AcuConsole's built-in panels and functions will see the new values and change accordingly. As such, it is important to know the structure of the standard database nodes and parameters. In general, the nodes and parameters follow AcuSolve's commands and parameters names, plus a few simple rules.
node = ROOT + RS + 'ANALYSIS'
title = GetStr( node, 'title', '' )
sub_title = GetStr( node, 'sub_title', '' )
input_version = GetStr( node, 'input_version', '' )
type = GetEnum( node, 'type', '' )
name = 'flow'
node = ROOT + RS + 'STAGGER' + RS + name
PutEnum( node, 'equation', 'flow' )
name = 'Air'
nodeMat = ROOT + RS + 'MATERIAL_MODEL' + RS + name
nodeDens = nodeMat + RS + 'DENSITY_MODEL'
PutEnum( nodeDens, 'type', 'constant' )
PutReal( nodeDens, 'density', 1.225, unit='kg/m3' )
name = 'Air'
specId = 1
nodeMat = ROOT + RS + 'MATERIAL_MODEL' + RS + name
nodeDiff1 = nodeMat + RS + 'DIFFUSIVITY_' + specId + '_MODEL'
name = 'Air'
nodeMat = ROOT + RS + 'MATERIAL_MODEL' + RS + name
PutEnum( nodeMat, 'medium', 'fluid' )
The BODY_FORCE command follows the same rules as the MATERIAL_MODEL command.
coordinates = ROOT + RS + 'Mesh' + RS + 'Coordinate'
modelSrf = ROOT + RS + 'Model' + RS + 'Surfaces'
meshSrf = ROOT + RS + 'Mesh' + RS + 'Surfaces'
geomSrf = ROOT + RS + 'Geom' + RS + 'Surfaces'
modelVol = ROOT + RS + 'Model' + RS + 'Volumes'
meshVol = ROOT + RS + 'Mesh' + RS + 'Volumes'
geomVol = ROOT + RS + 'Geom' + RS + 'Volumes'modelNbc = ROOT + RS + 'Model' + RS + 'Nodes'
meshNbc = ROOT + RS + 'Mesh' + RS + 'Nodes'
geomNbc = ROOT + RS + 'Geom' + RS + 'Nodes'
modelPbc = ROOT + RS + 'Model' + RS + 'Periodics'
meshPbc = ROOT + RS + 'Mesh' + RS + 'Periodics'
geomPbc = ROOT + RS + 'Geom' + RS + 'Periodics'
modelMex = ROOT + RS + 'Model' + RS + 'Mesh Extrusions'
meshMex = ROOT + RS + 'Mesh' + RS + 'Mesh Extrusions'
geomMex = ROOT + RS + 'Geom' + RS + 'Mesh Extrusions'
modelEdg = ROOT + RS + 'Model' + RS + "Edges"
meshEdg = ROOT + RS + 'Mesh' + RS + "Edges"
geomEdg = ROOT + RS + 'Geom' + RS + 'Edges'
The Geom and Mesh nodes only contain the basic geometry and mesh connectivity. The problem specific data is stored under Model entities. Each model entity contains two list parameters called geomSets and meshSets. These reference the corresponding geometry and mesh entities. You should not access these parameters directly, but rather use the functions MoveGeomSrf() and MoveMeshSrf() (and similar one) to manipulate them. In general, the only data of interest from the geom and mesh entities are their names and their bounding information. These may be used for grouping them, that is, associating them with a model entity. The names are obtained from the GetChildren() command, while the bounding data is obtained using the XXX-to-be-defined-XXX functions.
name = 'inflow'
node = modelSrf + RS + name + RS + 'SIMPLE_BOUNDARY_CONDITION'
PutBool( node, 'active', True )
PutEnum( node, 'type', 'wall' )
All parameters follow those of AcuSolve commands. In addition, each command has a boolean parameter called active which indicates whether or not this node is active. In turn, this parameter controls the opening of panels as well as outputting the command in AcuSolve input file.