ansys.mapdl.core.Mapdl.pcalc#
- Mapdl.pcalc(oper='', labr='', lab1='', lab2='', fact1='', fact2='', const='', **kwargs)#
Forms additional labeled path items by operating on existing path items.
Mechanical APDL Command: PCALC
- Parameters:
- oper
str
Type of operation to be performed. See PCALC_notes below for specific descriptions of each operation:
ADD
- Adds two existing path items.MULT
- Multiplies two existing path items.DIV
- Divides two existing path items (a divide by zero results in a value of zero).EXP
- Exponentiates and adds existing path items.DERI
- Finds a derivative.INTG
- Finds an integral.SIN
- Sine.COS
- Cosine.ASIN
- Arcsine.ACOS
- Arccosine.LOG
- Natural log.
- labr
str
Label assigned to the resulting path item.
- lab1
str
First labeled path item in operation.
- lab2
str
Second labeled path item in operation.
Lab2
must not be blank for the MULT, DIV, DERI, and INTG operations.- fact1
str
Factor applied to
Lab1
. A (blank) or ‘0’ entry defaults to 1.0.- fact2
str
Factor applied to
Lab2
. A (blank) or ‘0’ entry defaults to 1.0.- const
str
Constant value (defaults to 0.0).
- oper
Notes
If
Oper
= ADD, the command format is:pcalc,ADD,
LabR
,Lab1
,Lab2
,FACT1
,FACT2
,CONST
This operation adds two existing path items according to the operation:
LabR
= (FACT1
xLab1
) + (FACT2
xLab2
) +CONST
It may be used to scale the results for a single path item.
If
Oper
= MULT, the command format is:pcalc,MULT,
LabR
,Lab1
,Lab2
,FACT1
Lab2
must not be blank. This operation multiplies two existing path items according to the operation:LabR
=Lab1
xLab2
xFACT1
If
Oper
= DIV, the command format is:pcalc,DIV,
LabR
,Lab1
,Lab2
,FACT1
Lab2
must not be blank. This operation divides two existing path items according to the operation:LabR
= (Lab1
/Lab2
) xFACT1
If
Oper
= EXP, the command format is:pcalc,EXP,
LabR
,Lab1
,Lab2
,FACT1
,FACT2
This operation exponentiates and adds existing path items according to the operation:
LabR
= (|Lab1
| FACT1 ) + (|Lab2
| FACT2 |)If
Oper
= DERI, the command format is:pcalc,DERI,
LabR
,Lab1
,Lab2
,FACT1
Lab2
must not be blank. This operation finds a derivative according to the operation:LabR
=FACT1
x d(Lab1
)/d(Lab2
)If
Oper
= INTG, the command format is:pcalc,INTG,
LabR
,Lab1
,Lab2
,FACT1
Lab2
must not be blank. This operation finds an integral according to the operation:Use S for
Lab2
to integrateLab1
with respect to the path length. S, the distance along the path, is automatically calculated by the program when a path item is created with the pdef command.If
Oper
= SIN, COS, ASIN, ACOS, or LOG, the command format is:pcalc,Oper,
LabR
,Lab1
,FACT1
,CONST
where the function (SIN, COS, ASIN, ACOS or LOG) is substituted for
Oper
andLab2
is blank.The operation finds the resulting path item according to one of the following formulas:
LabR
= FACT2 xsin(FACT1 x Lab1) + CONST
LabR
= FACT2 xcos(FACT1 x Lab1) + CONST
LabR
= FACT2 xsin
-1(FACT1 x Lab1) + CONSTLabR
= FACT2 xcos
-1(FACT1 x Lab1) + CONSTLabR
= FACT2 xlog(FACT1 x Lab1) + CONST