개요
Hyfeast의 커맨드라인 유한요소 해석프로그램인 hfAnalyzer는 텍스트 입력파일을 읽어 해석을 수행한다. 입력파일은 *Node
, *Element
등과 같이 *
로 시작하는 예약된 키워드로 시작하는 명령어 블록 구조로 구성된다. 다음은 간단한 프레임 해석에 대한 입력 파일이다.
# Portal Frame Example
*Node
1, 0., 0.
2, 0.,10.
3,10.,10.
4,10., 0.
*Element, Type=B2D2H, ELSet=ALL
1, 1, 2
2, 2, 3
3, 3, 4
*Material, Type=IsoElasticity, Name=beam
210E9, 0.3, 0, 7700 # E, nu, alpha, density
*Section, Type=Beam, Name=BeamSection, Mass=Lumped
*Cell, TYPE=Rectangle, MAT=beam
0.4, 0.1
*Distribution, TYPE=Section
ALL, BeamSection
*Constraint, Type=Support, Name=BC
1, X|Y|RZ
4, X|Y|RZ
*Load, Type=Concentric, Name=LC2
2,X,100E3
*NSet, Type=SELECT, Name=23
2, 3
*NSet, Type=SELECT, Name=14
1, 4
#---------- Static analysis for odal concentric load
*Step, Type=Static, Name=Case1
*Activate, Type=Element
ALL
*Activate, Type=Constraint
BC
*Activate, Type=Load
LC2
*Output, Frequency=1
D,FN,BSF
*Print, File=Case1.prn
D@23, FN@14
#---------- Frequency extraction analysis
*Step, Type=Frequency, Name=Case2
10
*Activate, Type=Element
ALL
*Activate, Type=Constraint
BC
*Output
D # if frequency step, D means mode shape.
*Print, File=Case2.prn
입력 텍스트 파일에서 사용되는 일반규칙을 나열한 것이다.
- 한글과 같은 Non-Ascii 문자가 존재하는 경우 UTF-8로 인코딩되어야 한다. .
- 입력파일은 텍스트파일이며 한 줄씩 순차적으로 읽어들어 파싱한다.
- 공백라인은 무시하고, # 문자로 설명문(commentation)을 작성할 수 있다.
- \ 문자를 사용하여 다음 줄과 연결(concatenation)할 수 있다.
- 예약된 키워드(keyword)의 대소문자를 구분하지 않으나, 사용자가 정의한 문자열(예를 들어 요소집합 이름 등)은 대소문자를 구분한다.
-
각 라인은 n1, n2, n3 또는 n1, ..., ID=id1, ... 등과 같은 형태를 가지는 프리포맷(free format)이다. 이때 파싱의 대싱이 되는 토큰(token)은 등호(=), 쉼표(,)를 기준으로 구분된다. 프로그램 내부적으로 작동하는 방식은 다음과 같다.
- 등호(=)를 찾아 등호의 왼쪽 키워드를 인식
- 프리포맷(free format) 형태로 인식된 각각을 쉼표(,)를 구분자로 각 토큰으로 분할
- 이중따움표로 둘러쌓인 경우 하나의 토큰으로 인식
-
실수나 정수로 입력이 되는 부분은 간단한 산술 연산을 수행할 수 있다. 예를 들어
1+2*(10+2)
와 같은 산술 연산을 수행한다. 연산식 내에 공백이 존재하는 경우 토큰으로 분리되므로 공백이 존재하면 안된다. 만약 공백이 존재하는 경우 하나의 토큰으로 인식하게 하려면 이중따옴표를 사용하여야 한다(예“1 + 2*(10+2)”
) -
산술식에서는 20sin(30deg) 등과 같이 다음에서 미리 정의된 함수, 상수 등을 사용할 수 있다.
f(x)
형태의 함수:sin
,cos
,tan
,acos
,atan
,cosh
,sinh
,tanh
,abs
,exp
,log
,log10
,sqrt
,step
,sgn
f(x,y)
형태의 함수:pow
,max
,min
- Constant:
pi
,e
,deg
-
문자열이 입력되는 부분에서 공백이 있는 경우 이중따움표로 묶어주어야 한다. 예를 들어
*Material, TYPE=IsoElasticity, Name="the material"
) - 파일명을 문자열로 입력받는 경우 상대경로, 절대경로를 모두 인식한다. 만약 경로상에 공백이 있는 경우 이중따움표로 묶어주어야 한다. 상대경로는 입력파일이 존재하는 디렉토리를 기준으로 한다. 예를 들어 다음과 같다.
*Include, File=모델1.inp
*Include, File=템플릿/모델1.inp
*Include, File=“템플릿 폴더/모델 1.inp” ← 공백이 있는 경우 이중따옴표 적용
*Include, File="./템플릿/프레임 모델.inp" ← .은 현재 디렉토리 .
*Include, File="../프레임 모델.inp“ ← ..은 부모 디렉토리
*Include, File="D:/DevProg/HFC4.0/EXAMPLE/프레임 모델.inp" ← 절대 경로
*로 시작하는 명령어(command)는 크게 모델링 명령, 해석 명령, 기타 명령로 구분할 수 있다. 다음은 명령어를 요약한 것이다.
절점 명령
*Node
: Define a node.*NSet
: Define a nset.*NGen
: Generate nodes with a line pattern and assign them to a nset.*NFill
: Generate nodes with a filling pattern and assign them to a nset.*NCopy
: Copy a nset.
요소 명령
*Element
: Define an element.*ELSet
: Define an elset.*ELGen
: Generate elements and assign them to an elset.*ELCopy
: Copy an elset.*Section
: Define a section.
하중과 구속조건 명령
*Load
: Define a load.*Constraint
: Define a constraint.
프라퍼티 명령
*Material
: Define a material.*Function
: Define a function.*Surface
: Define surface*Construction
: Define auxilieary geometric entities – spline and construciton line.*CoordinateSystem
: Define a coordinate system.
해석 명령
*Step
: Define analysis step*Activate
: Activate elements, constraints, and loads*Inactivate
: Inactivate elements, constraints, and loads*Convergency
: Assign convergency crietria*SolutionAlgorithm
: Assign solution algorithm for equilibrium iteration*TimeIntegration
: Assign time integration scheme for dynamic step*RayleighDamping
: Assign Rayleigh damping for dynamic step*Modal
: Set dynamic analysis with modal analysis and assign modal damping ratios.*Field
: Set element's field state*Output
: Assign requests for field output for output file(ODB file).*Print
: Assign requests for printing fields for a specified text file.*Check
: Assign request for field check
해석 결과 관리 명령
*PostStep
: Generate new step from other step's results*History
: Assign request for history output.*PostHistory
: Extract history output from existing steps.*HDB
: Load HDB file(.hdb
)
모델링 편의 명령
*Include
: Include external file.*DefaultParameter
: Assign default parameter expression*Distribution
: Assign nodal and element properties*Model
: Generate template model
기타 명령
*Environment
: Setup environment*Stop
: Setup control parameters*TestMaterial
: Test material model for given strain history