General Commands > About General Commands > model.modelNode()

model.modelNode()
Model nodes.
Syntax
model.modelNode().create(<tag>);
model.modelNode().create(<tag>, <basetag>);
model.modelNode().create(<tag>, <type>);
 
model.modelNode(<tag>).scope();
model.modelNode(<tag>).baseSystem();
model.modelNode(<tag>).baseSystem(<system>);
model.modelNode(<tag>).sorder();
model.modelNode(<tag>).sorder(<stype>);
model.modelNode(<tag>).defineLocalCoord();
model.modelNode(<tag>).defineLocalCoord(boolean);
Description
model.modelNode(<tag>) represents a model node in the model tree.
model.modelNode().create(<tag>) creates a model node with the given tag.
model.modelNode().create(<tag>, <basetag>) creates an extra dimension model node with the tag <tag> associated to the base model node <basetag>.
model.modelNode().create(<tag>, <type>) creates a model node with the tag <tag> of one of the following types, set as the string <type>: Component, for a normal geometry component; ExtraDim, for an extra dimension; or MeshComponent, for a mesh component. For example, to create a mesh component:
model.modelNode().create("mcomp1", "MeshComponent");
model.geom().create("mgeom1", 3);
model.mesh().create("mpart1", "mgeom1");
model.modelNode(<tag>).scope() returns the fully qualified scope name.
model.modelNode(<tag>).baseSystem(<system>) use the given base system as unit system for the model node. This overrides the global unit system specified for the entire model object. To use global system again, set the base system of the model node to null.
model.modelNode(<tag>).sorder() returns the geometry shape order used for the model node and its descendants.
model.modelNode(<tag>).sorder(<stype>) Sets the geometry shape order. Allowed values are automatic, linear, quadratic, cubic, quartic, and quintic, and the default is automatic. With automatic shape order the physics interfaces under the model node decide the most optimum shape order.
model.modelNode(<tag>).defineLocalCoord() returns true if local coordinate variables exist. By default, this is the case, except for model components created before version 5.0.
model.modelNode(<tag>)).defineLocalCoord(boolean) sets a flag that determines whether local coordinate variables exist.
Note
You assign a model node to a physics interface, a geometry, and so forth using the methods
model.geom(<tag>).model(<mtag>);
model.physics(<tag>).model(<mtag>);
The methods
model.geom(<tag>).model();
model.physics(<tag>).model();
return the tag of the current model node.
The last created model node is the default model node for any geometry or physics interface that you create.  If no model node exists when you create a geometry or a physics interface, a default model node with tag mod1 is automatically created for you.
Example
Create a model node and assign it to a geometry and an analytic function.
Code for use with Java
model.modelNode().create("mod1");
 
model.geom().create("geom1", 3);
model.geom("geom1").model("mod1");
 
model.func().create("an1", "Analytic");
model.func("an1").model("mod1");
Code for use with MATLAB
model.modelNode.create('mod1');
 
model.geom.create('geom1', 3);
model.geom('geom1').model('mod1');
 
model.func.create('an1', 'Analytic');
model.func('an1').model('mod1');
Compatibility
The model.modelNode().createExtraDim(<tag>) method has been deprecated in version 5.2. Use model.modelNode().create(<tag>), "ExtraDim"); instead.