'분류 전체보기'에 해당되는 글 96건
- 2013.12.31 VLC Player 한글 설정
- 2013.12.31 Command List
- 2013.12.31 Calculate Average Temperature
- 2013.12.31 Offsetting a temperature result
- 2013.11.06 Atomistic and Continuum Studies of Deformation and Failure in Brittle Solids and Thin Film Systems
- 2013.10.22 Ansys Command
- 2013.09.06 Fracture Mechanics of Ceramics
- 2013.09.06 flexible flat panel displays
- 2013.08.30 stretchable electronics
- 2013.06.01 Matlab get all files including subdirectories
NSEL(N) Status of node N: -1=unselected, 0=undefined, 1=selected. |
ESEL(E) Status of element E: -1=unselected, 0=undefined, 1=selected. |
KSEL(K) Status of keypoint K: -1=unselected, 0=undefined, 1=selected. |
LSEL(L) Status of line L: -1=unselected, 0=undefined, 1=selected. |
ASEL(A) Status of area A: -1=unselected, 0=undefined, 1=selected. |
VSEL(V) Status of volume V: -1=unselected, 0=undefined, 1=selected. |
# Next Selected Entity |
NDNEXT(N) Next selected node having a node number greater than N. |
ELNEXT(E) Next selected element having an element number greater than E. |
KPNEXT(K) Next selected keypoint having a keypoint number greater than K. |
LSNEXT(L) Next selected line having a line number greater than L. |
ARNEXT(A) Next selected area having an area number greater than A. |
VLNEXT(V) Next selected volume having a volume number greater than V. |
# Locations |
CENTRX(E) Centroid X-coordinate of element E in global Cartesian coordinate system. Centroid is determined from the selected nodes on the element. |
CENTRY(E) Centroid Y-coordinate of element E in global Cartesian coordinate system. Centroid is determined from the selected nodes on the element. |
CENTRZ(E) Centroid Z-coordinate of element E in global Cartesian coordinate system. Centroid is determined from the selected nodes on the element. |
NX(N) X-coordinate of node N in the active coordinate system. |
NY(N) Y-coordinate of node N in the active coordinate system. |
NZ(N) Z-coordinate of node N in the active coordinate system. |
KX(K) X-coordinate of keypoint K in the active coordinate system |
KY(K) Y-coordinate of keypoint K in the active coordinate system |
KZ(K) Z-coordinate of keypoint K in the active coordinate system |
LX(L,LFRAC) X-coordinate of line L at length fraction LFRAC (0.0 to 1.0). |
LY(L,LFRAC) Y-coordinate of line L at length fraction LFRAC (0.0 to 1.0). |
LZ(L,LFRAC) Z-coordinate of line L at length fraction LFRAC (0.0 to 1.0). |
LSX(L,LFRAC) X slope of line L at length fraction LFRAC (0.0 to 1.0). |
LSY(L,LFRAC) Y slope of line L at length fraction LFRAC (0.0 to 1.0). |
LSZ(L,LFRAC) Z slope of line L at length fraction LFRAC (0.0 to 1.0). |
# Nearest to Location |
NODE(X,Y,Z) Number of the selected node nearest the X,Y,Z point (in the active coordinate system, lowest number for coincident nodes). |
KP(X,Y,Z) Number of the selected keypoint nearest the X,Y,Z point (in the active coordinate system, lowest number for coincident nodes). |
# Distances |
DISTND(N1,N2) Distance between nodes N1 and N2. |
DISTKP(K1,K2) Distance between keypoints K1 and K2. |
DISTEN(E,N) Distance between the centroid of element E and node N. Centroid is determined from the selected nodes on the element. |
# Angles (in radians by default -- see the *AFUN command) |
ANGLEN(N1,N2,N3) Subtended angle between two lines (defined by three nodes where N1 is the vertex node). Default is in radians. |
ANGLEK(K1,K2,K3) Subtended angle between two lines (defined by three keypoints where K1 is the vertex keypoint). Default is in radians. |
# Nearest to Entity |
NNEAR(N) Selected node nearest node N. |
KNEAR(K) Selected keypoint nearest keypoint K. |
ENEARN(N) Selected element nearest node N. The element position is calculated from the selected nodes. |
# Areas |
AREAND(N1,N2,N3) Area of the triangle with vertices at nodes N1, N2, and N3. |
AREAKP(K1,K2,K3) Area of the triangle with vertices at keypoints K1, K2, and K3. |
ARNODE(N) Area at node N apportioned from selected elements attached to node N. For 2-D planar solids, returns edge area associated with the node. For axisymmetric solids, returns edge surface area associated with the node. For 3-D volumetric solids, returns face area associated with the node. For 3?D, select all the nodes of the surface of interest before using ARNODE. |
# Normals |
NORMNX(N1,N2,N3) X-direction cosine of the normal to the plane containing nodes N1, N2, and N3. |
NORMNY(N1,N2,N3) Y-direction cosine of the normal to the plane containing nodes N1, N2, and N3. |
NORMNZ(N1,N2,N3) Z-direction cosine of the normal to the plane containing nodes N1, N2, and N3. |
NORMKX(K1,K2,K3) X-direction cosine of the normal to the plane containing keypoints K1, K2, and K3. |
NORMKY(K1,K2,K3) Y-direction cosine of the normal to the plane containing keypoints K1, K2, and K3. |
NORMKZ(K1,K2,K3) Z-direction cosine of the normal to the plane containing keypoints K1, K2, and K3. |
# Connectivity |
ENEXTN(N,LOC) Element connected to node N. LOC is the position in the resulting list when many elements share the node. A zero is returned at the end of the list. |
NELEM(E,NPOS) Node number in position NPOS (1--20) of element E. |
NODEDOF(N) Returns the bit pattern for the active DOFs at the specified node.bit 0 is UX, bit 1 is UY,... bit 5 is ROTZ bits 6,7,8 are AX,AY,AZ bits 9,10,11 are VX,VY,VZ bit 18 is PRES, bit 19 is TEMP, bit 20 is VOLT, bit 21 is MAG bit 24 is EMF, bit 25 is CURR For a node with UX,UY,UZ the return value will be 7 (bits 0,1,2) For a node with UX,UY,UZ,ROTX,ROTY,ROTZ the return value will be 63 (bits 0,1,2,3,4,5) |
# Faces |
ELADJ(E,FACE) For 2-D planar solids and 3-D volumetric solids, element adjacent to a face (FACE) of element E. The face number is the same as the surface load key number. Only elements of the same dimensionality and shape are considered. A -1 is returned if more than one is adjacent. |
NDFACE(E,FACE,LOC) Node in position LOC of a face number FACE of element E. The face number is the same as the surface load key number. LOC is the nodal position on the face (for an IJLK face, LOC=1 is at node I, 2 is at node J, etc.) |
NMFACE(E) Face number of element E containing the selected nodes. The face number output is the surface load key. If multiple load keys occur on a face (such as for line and area elements) the lowest load key for that face is output. |
ARFACE(E) For 2-D planar solids and 3-D volumetric solids, returns the area of the face of element E containing the selected nodes. For axisymmetric elements, the area is the full (360 degree) area. |
# Degree of Freedom Results |
UX(N) UX structural displacement at node N. |
UY(N) UY structural displacement at node N. |
UZ(N) UZ structural displacement at node N. |
ROTX(N) ROTX structural rotation at node N. |
ROTY(N) ROTY structural rotation at node N. |
ROTZ(N) ROTZ structural rotation at node N. |
TEMP(N) Temperature at node N. For SHELL131 and SHELL132 elements with KEYOPT(3) = 0 or 1, use TBOT(N), TE2(N), TE3(N), . . ., TTOP(N) instead of TEMP(N). |
PRES(N) Pressure at node N. |
VX(N) VX fluid velocity at node N. |
VY(N) VY fluid velocity at node N. |
VZ(N) VZ fluid velocity at node N. |
ENKE(N) Turbulent kinetic energy (FLOTRAN) at node N. |
ENDS(N) Turbulent energy dissipation (FLOTRAN) at node N. |
VOLT(N) Electric potential at node N. |
MAG(N) Magnetic scalar potential at node N. |
AX(N) AX magnetic vector potential at node N. |
AY(N) AY magnetic vector potential at node N. |
AZ(N) AZ magnetic vector potential at node N. |
# Returns information about the data base manager |
VIRTINQR(1) Number of pages in core. |
VIRTINQR(4) Page size in integer words. |
VIRTINQR(7) Maximum number of pages allowed on disk. |
VIRTINQR(8) Number of read/write operations on page. |
VIRTINQR(9) Maximum record number on page. |
VIRTINQR(11) Maximum pages touched. |
# Returns the current value of ANSYS filtering keywords. |
KWGET(KEYWORD) Returns the current value the keyword specified by KEYWORD. See the ANSYS UIDL Programmer's Guide for a list of keywords and values. |
# Character String Functions Strings must be dimensioned (see *DIM) as a character parameter or enclosed in single apostrophes ('char'). |
# Functions which return a double precision value of a numeric character string. |
VALCHR(a8) a8 is a decimal value expressed in a string. |
VALOCT (a8) a8 is an octal value expressed in a string. |
VALHEX(a8) a8 is a hex value expressed in a string. |
# Functions which return an 8 character string of a numeric value. |
CHRVAL (dp) dp is a double precision variable. |
CHROCT (dp) dp is an integer value. |
CHRHEX(dp) dp is an integer value. |
# Functions which manipulate strings: StrOut is the output string (or character parameter) Str1 and Str2 are input strings. Strings are a maximum of 128 characters. (see *DIM) StrOut = STRSUB(Str1, nLoc,nChar) Get the nChar substring starting at character nLoc in Str1. StrOut = STRCAT(Str1,Str2) Add Str2 at the end of Str1. |
STRFILL(Str1,Str2,nLoc) StrOut = STRFILL(Str1,Str2,nLoc) Add Str2 to Str1 starting at character nLoc. |
STRCOMP(Str1) StrOut = STRCOMP(Str1) Remove all blanks from Str1 |
STRCOMP(Str1) Left-justify Str1 |
STRPOS(Str1,Str2) nLoc = STRPOS(Str1,Str2) Get starting location of Str2 in Str1. |
STRLENG(Str1) nLoc = STRLENG(Str1) Location of last nonblank character |
UPCASE(Str1) StrOut = UPCASE(Str1) Upper case of Str1 |
LWCASE(Str1) StrOut = LWCASE(Str1) Lower case of Str1 |
# The following functions manipulate file names. |
JOIN ('directory','filename','extension') Path String = JOIN ('directory','filename','extension') Produces a contiguous pathstring. e.g. directory/filename.ext |
JOIN ('directory','filename') Path String = JOIN ('directory','filename') Produces a contiguous pathstring. e.g. directory/filename |
SPLIT('PathString', 'DIR') Produces a separate output of the directory from the pathstring. |
SPLIT('PathString', 'FILE') Produces a separate output of the complete filename (with extension) from the pathstring. |
SPLIT('PathString', 'NAME') Produces a separate output of the filename from the pathstring. |
SPLIT('PathString', 'EXT') Produces a separate output of the file extension from the pathstring. |
Using a Commands Object for Average Value on a Face
Arguments can be passed to a Commands Object in its Input details. The macro is written to accept three Input arguments to indicate Load Step, Substep, or Time for the result to be formed. If the Input arguments are all blank, then SET,LAST is used to read the final result. The arguments are:
ARG1 is the Load Step number
- ARG2 is the Substep number
- ARG3 is the Time of interest
The macro is written to apply the following logic to loading a result:
- If ARG1 and ARG3 are zero, the SET,LAST command is used to get the result at the end of the analysis results file.
- If ARG1 is nonzero, then ARG3 for time will be ignored.
- If ARG1 is nonzero and ARG2 is zero, the SET command reads the last substep of the Load Step number in ARG1.
The Commands Object creates three Output parameters that report:
- Average temperature value calculated
- Time of the result that was loaded by the SET command as a result of the Input arguments
- The result of an error check on the Named Selection, where “1” means OK
! Report average as parameter "my_temp_avg" in Details>Results
!
! The ARNODE function returns the area on solid element faces associated with
! a node on the surface. All nodes on the surface must be selected, so if we
! select only nodes on a surface of interest, only the element faces on that
! surface will contribute to the area estimate.
!
! ARG1=load step desired
! ARG2=substep desired, if blank, last substep of ARG1 load step is loaded
! ARG3=time desired, used only if ARG1=0
!
fini
/post1
!
*if,ARG1,eq,0,then
*if,ARG3,eq,0,then
set,LAST ! if nothing specified, use final value
*MSG,WARN
No Load Step or Time was provided to temperature average macro. %/&
SET,LAST will be used for final Load Step. See my_time Output in Details.
*else
set,,,,,ARG3 ! if ARG1=0 and ARG3<>0 use ARG3 time
*endif
*else
set,ARG1,ARG2
*endif
*get,my_time,ACTIVE,,SET,TIME ! time of result in database
!
*get,comptype,COMP,Temp_Here,TYPE ! what type of component
*if,comptype,ne,1,then ! is it a node component
my_comp_test=0
allsel
set,last
*MSG,ERROR
Named Selection "Temp_Here" must be created on face(s) of interest.
/EOF
*return,-1
*endif
!
cmsel,s,Temp_Here ! select nodes on face(s)
my_comp_test=1
!
*stat
*get,n_nodes,node,,count ! how many nodes in component
*dim,node_arnode,array,n_nodes ! associated elements surface area each node
*dim,node_t_a,array,n_nodes ! product of temperature*area at each node
node_next=0
*do,ii,1,n_nodes
node_next=NDNEXT(node_next) ! work through all the nodes
node_arnode(ii)=ARNODE(node_next) ! associated area on element faces
node_t_a(ii)=ARNODE(node_next)*TEMP(node_next) ! product
*enddo
*vscfun,sum_node_t_a,SUM,node_t_a(1) ! sum of temperature*area products
*vscfun,sum_area,SUM,node_arnode(1) ! sum of areas
!
my_temp_avg=sum_node_t_a/sum_area ! the average temperature on the surface
! my_temp_avg is reported in Results
allsel
set,last
!
finish
/post1
! Adjust temperature result by +459.67 degrees.
! Method using vectorized commands.
! This adjustment is undone by a SET command.
*get,min_node,node,,num,min
*get,max_node,node,,num,max
! Perform some basic error checking
*if,max_node,eq,0,then
*MSG,ERROR
No nodes are selected. Stopping.
*return,-1
/EOF
*endif
*get,dummytemp,node,min_node,temp
*if,_STATUS,ge,2,then
*MSG,ERROR,min_node
No temperature result, node %G. Stopping.
*return,-1
/EOF
*endif
! Prepare
*del,tempvec,,nopr ! In case it exists
*del,my_mask,,nopr
*del,toffset,,nopr
*dim,tempvec,array,max_node-min_node+1
*dim,toffset,array,max_node-min_node+1
*dim,my_mask,array,max_node-min_node+1
*vget,my_mask(1),node,min_node,nsel
*vfill,toffset(1),ramp,459.67
! Add the temperature offset, *VPUT into result
*vmask,my_mask(1)
*vget,tempvec(1),node,min_node,temp
*vmask,my_mask(1)
*voper,tempvec(1),tempvec(1),ADD,toffset(1)
*vmask,my_mask(1)
*vput,tempvec(1),node,min_node,temp
! Clean up and plot
*del,tempvec,,nopr
*del,my_mask,,nopr
*del,toffset,,nopr
*del,dummytemp
*del,min_node
*del,max_node
/title,Temperatures were offset.
plnsol,temp
/com, .
/com, Warning--temperature results of selected nodes were raised.
/com,
Source : http://www.simutechgroup.com
1. Distnd (i, j) - I, j the distance between two nodes
2. Node (x, y, z) - extract from the position (x, y, z) nearest node number
3. Kp (x, y, z) - extract from the position (x, y, z) number of key points nearest
4 Basic Functions
ABS (x) Absolute value of x.
SIGN (x, Y) Absolute value of x with Sign of Y. Y = 0 results in positive Sign.
EXP (x) Exponential of x (EX).
LOG (x ) Natural log of x (LN (x)).
LOG10 (x) Common log of x (log10 (x)).
SQRT (x) Square root of x.
NINT (x) Nearest integer to x.
MOD (x, Y ) Remainder of x / Y. Y = 0 Returns zero (0).
RAND (x, Y) Random number (Uniform Distribution) in the Range x to Y (x = Lower bound, Y = Upper bound).
GDIS (x, Y) Random Sample of a Gaussian (Normal) Distribution with mean x and standard Deviation Y.
SIN (x), COS (x), TAN (x) Sine, Cosine, and Tangent of x. x is in radians by Default, but can be changed to Degrees with * AFUN.
SINH (x), COSH (x), TANH (x) Hyperbolic sine, Hyperbolic cosine, and Hyperbolic Tangent of x.
ASIN (x), ACOS (x), ATAN (x) Arcsine , Arccosine, and Arctangent of x. x must be between -1.0 and 1.0 for ASIN and ACOS. Output is in radians by default, but can be changed to degrees with * AFUN. Range of output is-pi / 2 to pi / 2 for ASIN and ATAN, and 0 to PI for ACOS.
ATAN2 (Y, x) Arctangent of Y / x with the Sign of each Component Considered. Output is in radians by Default, but can be changed to Degrees with * AFUN. Range of output is-PI to PI.
VALCHR (CPARM) Numerical value of CPARM (IF CPARM is non-numeric, Returns 0.0).
CHRVAL (PARM) Character value of Numerical Parameter PARM. Number of decimal places depends on Magnitude.
UPCASE (CPARM) Upper Case equivalent of CPARM.
LWCASE (CPARM) Lower Case equivalent of CPARM.
5. Kx (i) indicates a key value of the x coordinate of point i; Similarly ky (i); kz (i)
6. Nx (i) represents the x-coordinate value of node i; Similarly ny (i); nz (i)
7. Nsel (k) is the node k is 1, that is not 0.
8. NDNEXT (N) Next higher node number above N in selected set (or zero if none found).
9. NELEM (ENUM, NPOS) returns the node number in position NPOS for element ENUM.
Node number at position 1,2, ... or 20 of elementN, where npos is 1,2, ... 20.
10. UX (N), UY (N), UZ (N) X, Y, or Z structural displacement or vector sum.
11. ROTX (N), ROTY (N), ROTZ (N) X, Y, or Z structural rotation or vector sum.
12. TEMP (N) Temperature.
13. PRES (N) Pressure.
14. VX (N), VY (N), VZ (N) X, Y, or Z fluid velocity or vector sum.
15. ENKE (N) Turbulent kinetic energy (FLOTRAN).
16. ENDS (N) Turbulent Energy Dissipation (FLOTRAN).
17. CENTRX (N), CENTRY (N), and CENTRZ (N) Always Retrieve the element Centroid in global Cartesian coordinates,
and are Determined from the selected nodes on the Elements .
18. ELADJ (N, face) Element number adjacent to face 1,2, ... 6.. Number assigned to the attribute Name,
where Name = MAT, TYPE, REAL, ESYS, PSTAT, LIVE attribute. A zero is returned if the element is unselected.
If Name = PSTAT (valid for p-elements only), a 1 is returned if the element.
19. ESEL (N) Select status of element N -1 = unselected, 0 = undefined.
20. ELNEXT (N) Next higher element number above N in selected set (or zero if none found).
21. KSEL (N) Select status of keypoint N -1 = unselected, 0 = undefined, 1 = selected.
22. KPNEXT (N) Next higher keypoint number above N in selected set (or zero if none found).
23. LSEL (N) Select status of line N -1 = unselected, 0 = undefined, 1 = selected.
24. LSNEXT (N) Next higher line number above N in the selected set (or zero if none found).
25. LX (n, lfrac) return the X coordinate location of line N at the length fraction lfrac (0.0 to 1.0).
Similarly, LY (n, lfrac); LZ (n, lfrac).
26. LSX (L, LFRAC) X Slope of line L at length fraction LFRAC (0.0 to 1.0).
LSY (L, LFRAC) Y Slope of line L at length fraction LFRAC (0.0 to 1.0).
LSZ (L, LFRAC) Z slope of line L at length fraction LFRAC (0.0 to 1.0).
27. ASEL (N) Select status of area N -1 = unselected, 0 = undefined, 1 = selected.
28. VSEL (N) Select status of volume N -1 = unselected, 0 = undefined, 1 = selected.
29. VLNEXT (N) Next higher volume number above N in selected set (or zero if none found).
30. Distance function
DISTND (N1, N2) Distance between nodes N1 and N2.
DISTKP (K1, K2) Keypoints Distance between K1 and K2.
DISTEN (E, N) Distance between the Centroid of element E and node N. Centroid is Determined from the selected nodes on the element.
31. Angle function (default in radians, unit conversion with * AFUN command)
ANGLEN (N1, N2, N3) subtended Angle between Two Lines (defined by three nodes N1 is the Vertex WHERE node). Default is in radians. ANGLEK (K1, K2, K3) Subtended angle between two lines (defined by three keypoints where K1 is the vertex keypoint). Default is in radians.
32 Recently physical function
NNEAR (N) Selected node Nearest node N.
KNEAR (K) Selected Keypoint Nearest Keypoint K.
ENEARN (N) Selected element Nearest node N. The element position is calculated from the selected nodes.
33. The area function
AREAND (N1, N2, N3) Area of the Triangle with vertices at nodes N1, N2, and N3.
AREAKP (K1, K2, K3) Area of the Triangle with vertices at Keypoints K1, K2, and K3.
ARNODE (N) Area at node N apportioned from selected elements attached to node N. For 2-D planar solids, returns edge area associated with the node. For axisymmetric solids, returns edge surface area associated with the node. For 3-D volumetric solids, returns face area associated with the node.
34 for the normal function
NORMNX (N1, N2, N3) X-Direction to the cosine of the Normal Plane containing nodes N1, N2, and N3.
NORMNY (N1, N2, N3) Y-Direction to the cosine of the Normal Plane containing nodes N1, N2, and N3.
NORMNZ (N1, N2, N3) Z-Direction to the cosine of the Normal Plane containing nodes N1, N2, and N3.
NORMKX (K1, K2, K3) of the X-Direction cosine Normal to the Plane containing Keypoints K1, K2, and K3.
NORMKY (K1, K2, K3) Y-Direction to the cosine of the Normal Plane containing Keypoints K1, K2, and K3.
NORMKZ (K1, K2, K3) Z- direction cosine of the normal to the plane containing keypoints K1, K2, and K3.
35 adjacent entities function
ENEXTN (N, LOC) Element Connected to node N. LOC is the position in the Resulting List when many Elements Share the node. A zero is returned at the End of the List.
NELEM (E, NPOS) Node number in position NPOS (1 - 20) of element E.
36 surface function
ELADJ (E, FACE) Element adjacent to a face (FACE) of element E. The face number is the same as the surface load key number. Only elements of the same dimensionality and shape are considered. A -1 is More than One is returned IF Adjacent.
NDFACE (E, FACE, LOC) Node in position LOC of a face number FACE of element E. The face number is the same as the Surface Load Key number. LOC is the nodal position on the face (for an IJLK face, LOC = 1 is at node I, 2 is at node J, etc.)
NMFACE (E) Face number of element E containing the selected nodes. The face number output is the Surface Load Key. If Multiple Load keys Occur on a face (such as for line and area Elements) the Lowest Load Key for that face is output.
ARFACE (E) For 2-D and 3-D solids Planar Volumetric solids, Returns the area of the face of element E containing the selected nodes. For axisymmetric elements, the area is the full (360 degree) area.
+ Mechanical Bending Fatigue Life Prediction Analysis
+ Failure and Fracture of Thin Film Materials for MEMS.
function fileList = getAllFiles(dirName)
dirData = dir(dirName); %# Get the data for the current directory
dirIndex = [dirData.isdir]; %# Find the index for directories
fileList = {dirData(~dirIndex).name}'; %'# Get a list of the files
if ~isempty(fileList)
fileList = cellfun(@(x) fullfile(dirName,x),... %# Prepend path to files
fileList,'UniformOutput',false);
end
subDirs = {dirData(dirIndex).name}; %# Get a list of the subdirectories
validIndex = ~ismember(subDirs,{'.','..'}); %# Find index of subdirectories
%# that are not '.' or '..'
for iDir = find(validIndex) %# Loop over valid subdirectories
nextDir = fullfile(dirName,subDirs{iDir}); %# Get the subdirectory path
fileList = [fileList; getAllFiles(nextDir)]; %# Recursively call getAllFiles
end
end