Properties |
Methods |
Set of common physical data of an edge, which are applicable to all kind of problems.
The LabelEdge object represents very general physical data applicable to an edge label.
When you need to change physical parameters for the edge label, you get the LabelEdge object using the Content property of the Label object, modify the LabelEdge object using its properties and then put it back in the Label object assigning your LabelEdge to the Content property of your Label object. Please see the example for Label object
The exact type of the LabelEdge object you get by the Label.Content property depends upon the problem type as show in the table:
Kind of Analysis |
LabelEdge Type |
Electrostatic problem | |
DC conduction problem | |
AC conduction problem | |
Transient electric problem | LabelEdgeTV |
DC and transient magnetics problem | |
AC magnetics | |
Heat transfer problem (static and transient) | |
Stress analysis problem |
The generic LabelEdge object provides only those properties that are common for all specific types of LabelEdges. These are:
Read-only |
Returns the qfEdge value showing that the data are applicable to an edge label. | |
ProblemType property
|
Read-only |
Returns the problem type. |
ConditionType property
|
Read-only |
Returns one of the QfBoundaryConditionType constants indicating the type of boundary condition (Dirichlet, Neumann, and other). |
Dirichlet property
|
Read and write |
Sets the given potential value on the edge as Double. |
DirichletLinear property
|
Read and write |
Sets the given potential value on the edge as a linear function of coordinates.
|
Neumann property
|
Read and write |
Sets the normal component of the potential gradient. |
Floating property
|
Read and write |
If True defines the edge as "floating", i.e. having a constant but a priori unknown potential. |
Empty property
|
Read-only |
Is True when the data are not given for this object. |
SetEmpty method |
Method |
Makes the LabelEdge empty. |
Each LabelEdge's subtype inherits all the methods and properties of the basic LabelEdge type listed above.
Generally an edge cannot have more than one boundary condition defined. Alternative types returned by the ConditonType property are:
qfDirichlet - the edge has a prescribed value of the potential;
qfNeumann - the value of the normal component of the potential gradient is defined;
qfFloating - the edge has a constant, but unknown potential.
If you set the boundary condition type for an edge several times, only the last setting is remembered.
The following example iterates through edge labels in the document and sets the same linear function as a Dirichlet condition to all Dirichlet edges, and zero (homogeneous) Neumann conditions to all Neumann edges:
Dim lb As QuickField.Label
For Each lb In prb.DataDoc.Labels(qfEdge)
Dim edgeData As EdgeEdge
Set edgeData = lb.Content
With edgeData
If .ConditionType = qfDirichlet Then
Dim lf as LinFunc
lf.a = 0
lf.b = 50
lf.c = 30
.DirichletLinear = lf
ElseIf .ConditionType = qfNeumann Then
.Neumann = 0
End If
End With
lb.Content = edgeData
Next