31
Automation for STAR-CCM+ Kim Hak-Soon

Automation for STAR-CCM+mdx2.plm.automation.siemens.com/sites/default/files... · 2018-05-06 · 현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Automation for STAR-CCM+mdx2.plm.automation.siemens.com/sites/default/files... · 2018-05-06 · 현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다

Automation for STAR-CCM+ Kim Hak-Soon

Page 2: Automation for STAR-CCM+mdx2.plm.automation.siemens.com/sites/default/files... · 2018-05-06 · 현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다

Automation ?

Automation Process Sample [KCS, Container Ship]

Demo

– CATIA,

– KCS[Container Ship]

– Excel

Automation 사례

Q&A

Agenda

Page 3: Automation for STAR-CCM+mdx2.plm.automation.siemens.com/sites/default/files... · 2018-05-06 · 현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다

Import CAD

Wrap/Resurface

Mesh

Generate

Volume Mesh

General Analysis Work Flow

Solving

Page 4: Automation for STAR-CCM+mdx2.plm.automation.siemens.com/sites/default/files... · 2018-05-06 · 현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다

• To handle random set of data quickly, and turn it into an aerodynamic &

Hydrodynamic model, automation was needed.

Automation = Analysis with Minimum User Interaction

Page 5: Automation for STAR-CCM+mdx2.plm.automation.siemens.com/sites/default/files... · 2018-05-06 · 현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다

Simulation 과정 중, 엔지니어의 업무량을 저감 할 수 있는 필요성 대두

엔지니어에 의한 실수 최소화 (ex. Dual Heat Exchanger Model)

엔지니어에 의한 반복적인 작업량을 감소 (ex. Resistance, Self-Propulsion)

CAE Tool에 익숙하지 않는 초보자도, 기존 담당자와 동일한 결과를 도출 (ex. Oven Automation)

사용자의 편의성(Automation 을 통한 시간 절감)을 도출하여 해석의 생산성을 증가 (ex. Layer TEST)

해석시간 단축을 통한 비용 절감

STAR-CCM+ 은 Java를 이용하여 제작

Java를 이용하기 때문에 기존 언어에 비하여 쉽게 접근

해석과정을 단순하게 처리할 수 있음

현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다.

사용자 GUI 구성이 다른 tools에 비해 손쉽게 된다.

Excel sheet를 이용한 구성(Pre, Post)이 쉽다.

Automation?

Page 6: Automation for STAR-CCM+mdx2.plm.automation.siemens.com/sites/default/files... · 2018-05-06 · 현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다

단일 통합 툴인 STAR-CCM+를 사용하여 비용을 절약하고 CAE 작업

효율성을 증대할 수 있다.

하나의 정형화된 스크립트는 각 CFD 단계에서 쓰임. 프로세스를 보다 쉽게 자동화 할 수 있음

각 단계마다 한 패키지에서 다른 패키지로 파일을 읽고 쓰는 동안 발생하는 정지시간을 감소

CFD 프로세스의 어느 단계(Pre, Solving, Post)로나 쉽게 들어가 수정과 변경이 가능

Automation Process In STAR-CCM+

Page 7: Automation for STAR-CCM+mdx2.plm.automation.siemens.com/sites/default/files... · 2018-05-06 · 현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다

STAR-CCM+, Automate and Customize!

Output: PowerPoint Input: Cad/Excel Run: Mesh/Solve/Post

Page 8: Automation for STAR-CCM+mdx2.plm.automation.siemens.com/sites/default/files... · 2018-05-06 · 현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다

Automation Process

Sample

Page 9: Automation for STAR-CCM+mdx2.plm.automation.siemens.com/sites/default/files... · 2018-05-06 · 현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다

컨테이너선 (KCS) Geometry

Outlet(Pressure Outlet)

Inlet(Velocity inlet)

Top(Slip-wall)

Bottom(Slip-wall)

Side(Symmetry) Symmetry(Symmetry)

초기 Surface

수정 Surface

최종 Surface [Automation Format]

Page 10: Automation for STAR-CCM+mdx2.plm.automation.siemens.com/sites/default/files... · 2018-05-06 · 현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다

Problem

• Edit Excel Sheet[Lpp, Bwl, Draft, inlet Velocity]

• Imported Hull suface [Ship] CAD Model *.iges,

• Generated Far Field Surface[If, fixed hull Surface]

• Run Automation Java with Excel Sheet

Goals

• Report : Resistance Force,

• Post-Process : Wave Elevation with Free Surface

컨테이너선(KCS) & 유조선(KVLCC)

Page 11: Automation for STAR-CCM+mdx2.plm.automation.siemens.com/sites/default/files... · 2018-05-06 · 현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다

자항해석 [Work Flow]

Page 12: Automation for STAR-CCM+mdx2.plm.automation.siemens.com/sites/default/files... · 2018-05-06 · 현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다

Providing Automation To Our Clients

Virtual Towing Tank is a Custom Application for building best practice with

ship Hydrodynamics

– CD-adapco has a team dedicated to provide custom process to clients

• Range from process described above, to custom post processing

• Provides excel which easy to learn and Apply.

Job: Meshing

CPU Time: 10Min

16-32 Nodes

Job: Solver

Elapsed: 12-24 hours

Job: Posting

Elapsed: 10Min

Page 13: Automation for STAR-CCM+mdx2.plm.automation.siemens.com/sites/default/files... · 2018-05-06 · 현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다

Demo 10 ~15 Min

CATIA, KCS, Excel

Q&A

Page 14: Automation for STAR-CCM+mdx2.plm.automation.siemens.com/sites/default/files... · 2018-05-06 · 현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다

- 변수: Fin의 높이, 수, 간격, 두께

sink2 폴더 -변수: 높이

Sink1 폴더 - 원본 형상

sink3 폴더 -변수: 수

sink4 폴더 -변수: 간격

sink5 폴더 -변수: 두께

Demo I [CATIA Automation]

각 폴더 별 변수 및 형상

Page 15: Automation for STAR-CCM+mdx2.plm.automation.siemens.com/sites/default/files... · 2018-05-06 · 현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다

EXCEL창의 구성

Sheet1은 Sheet2의 항목에서 존재하는 Case파일 항목들의 정보를 하나씩 가져와 저장됨.

Sheet2의 항목은 해석을 위한 형상들의 모든 정보를 나열하여 이를 바탕으로 Sheet1 로 각각의 형상 정보를 복사. 모든 정보 입력 후, 각 Case별로 폴더를 생성하고 형상파일을 저장하는 과정을 하나의 버튼으로 수행

Demo I [CATIA Automation]

Page 16: Automation for STAR-CCM+mdx2.plm.automation.siemens.com/sites/default/files... · 2018-05-06 · 현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다

생성 버튼 선택(클릭)으로 저장 폴더 생성 및 하위에 Case별 파일 저장

선택

생성 폴더 별 저장 파일

Demo I [CATIA Automation]

EXCEL창의 구성

Page 17: Automation for STAR-CCM+mdx2.plm.automation.siemens.com/sites/default/files... · 2018-05-06 · 현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다

Demo II [Resistance]

Page 18: Automation for STAR-CCM+mdx2.plm.automation.siemens.com/sites/default/files... · 2018-05-06 · 현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다

Demo

Excel sheet를 STAR-CCM+을 Control하는 자동화 기법

Excel에서 STAR-CCM+ batch job(background)을 실행하는 것이 기준으로 작성

– Semi Automation으로 구성이 되어 있으므로, Meshing, Solving으로 구분

Model

Setup

Mesh

Setup STAR-CCM+

Analysis Model

Clean CAD - Orifice

Clean CAD - Fluid Wall

Excel Sheet

Page 19: Automation for STAR-CCM+mdx2.plm.automation.siemens.com/sites/default/files... · 2018-05-06 · 현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다

Demo Excel Sheet[Base]

1. CAD File name: 동일 폴더에 들어있는 CAD File의 이름을 입력, Domain은 하나고 Orifice는 여러 개 사용 가능

2. Simulation file name: 동일 폴더에 들어있는 sim file의 이름을 입력 – 이 file은 아무것도 설정되어있지 않은 상태의 sim file

3. Make simulation file: 이 버튼을 누르면 각 하위 폴더로 각각의 CAD file과 Sim file이 복사되고, 이 각각의 파일들이 하위 Sheet에 저장됨. – 이때 sim file의 이름은 각 Cad file을 포함

4. Import Batch: CAD를 불러와서 surface cleanup 작업을 하는 Batch file을 만들고 Batch job을 수행

5. Solving Batch: Mesh를 짜고, 계산을 돌리는 Batch file을 만들고 Batch job을 수행

6. Post Processing: 계산결과 (Scalar Scene)을 파일로 저장하고 각 sheet에 복사

Page 20: Automation for STAR-CCM+mdx2.plm.automation.siemens.com/sites/default/files... · 2018-05-06 · 현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다

Automation 사례

Page 21: Automation for STAR-CCM+mdx2.plm.automation.siemens.com/sites/default/files... · 2018-05-06 · 현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다

사례 II [Oven Automation]

목적 : 조리 성능 확보 업무를 진행하는 개발자가, 쉽게 유동의 패턴을 눈으로 확인하여,

개발일정 및 개발비(재료비 및 실험비)를 저감하는데 도움이 되는 CFD 자동화

프로그램을 개발

효과 : 반복 작업량 감소를 통한 해석시간 단축

CAE Tool에 대한 사전 지식이 없이 최단 시간 내에 개발자가 원하는 결과 도출

개발자가 단독으로 결과를 확인 할 수 있는 시간 단축 (일관성이 있는 결과 도출 가능)

조리분포의 경향을 확인 할 수 있어, 실험재료 및 실험 시간을 효과적으로 사용 가능

결과 : Excel Sheet 를 적용한, 해석조건 및 결과 정리 효과적인 폴더 및 Solution 관리 가능

Page 22: Automation for STAR-CCM+mdx2.plm.automation.siemens.com/sites/default/files... · 2018-05-06 · 현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다

사례 III [Paint Dipping]

목적 : 차체의 수정 및 보완에 따른 Bubble 및 도장이 정상적으로 진행되는 여부 판독 할 수 있도록 자동차의 차체를 페인트 부분에 침수 시켜 표면을 도장하는 과정을 자동화로 진행

내용 : VOF(Volume of Fluid) Multiphase Analysis, Transient Motion, Specialized Post Processing

결과 : 다양한 자동차 Part, Coating 방법, Coating 시간 등에 대한 Dipping 자동화를 수행

Page 23: Automation for STAR-CCM+mdx2.plm.automation.siemens.com/sites/default/files... · 2018-05-06 · 현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다

사례 IV [차량냉각모듈해석 Process]

목적 : CAD(Pre)를 기준으로 PPT(Post-Processing)결과를 도출하는 전 과정을 자동화함

CFD에 대한 지식이 없는 설계자의 경우도 사용할 수 있도록 제작

효과 : 반복 작업량 감소를 통한 해석시간 단축

차량UnderHood 내부의 변경에 따른 Heat Exchanger의 성능을 파악 가능

GUI 와 Excel을 연동하여 다양한 Parameter의 변경이 가능하여 다양한 설계인자 고려

결과 : Case당 해석 시간을 1/2로 단축하여 전체 개발 기간을 단축 함

Page 24: Automation for STAR-CCM+mdx2.plm.automation.siemens.com/sites/default/files... · 2018-05-06 · 현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다

사례 IV [차량냉각모듈해석 Process]

Radiator Grill

Condenser

Radiator

Tank

Radiator

Fan

Cold Stream

Air

Target Heat Rejection

Duel Stream Heat Exchanger

Page 25: Automation for STAR-CCM+mdx2.plm.automation.siemens.com/sites/default/files... · 2018-05-06 · 현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다

Click.... Click ....Click ….

Vehicle Operation

Condenser

Fan

Radiator

Page 26: Automation for STAR-CCM+mdx2.plm.automation.siemens.com/sites/default/files... · 2018-05-06 · 현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다

사례 V [External Aerodynamic Analysis]

Page 27: Automation for STAR-CCM+mdx2.plm.automation.siemens.com/sites/default/files... · 2018-05-06 · 현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다

감사합니다.

Q&A

Page 28: Automation for STAR-CCM+mdx2.plm.automation.siemens.com/sites/default/files... · 2018-05-06 · 현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다

Preparation For Handling Excel Data

•1. JAVA에서 MS Office를 다루기 위한 Class 3개

2. STAR-CCM + 의 Option 에서 Environment - User macro

Classpath 설정

• 3개의 클래스가 저장된 위치 설정

Page 29: Automation for STAR-CCM+mdx2.plm.automation.siemens.com/sites/default/files... · 2018-05-06 · 현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다

Macro Explanation

STAR CCM+ Class

Excel File Handling Class

반드시 java 파일 명과 같아야 함

제목에 빈칸 허용 불가

같은 폴더 내에 존재하는 Excel 파일 명

제목에 빈칸 허용 불가

Page 30: Automation for STAR-CCM+mdx2.plm.automation.siemens.com/sites/default/files... · 2018-05-06 · 현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다

반드시 Excel 파일의 Sheet 수가 일치해야 함

rowNum : 읽어드릴 수 있는 Row의 수

cellNum : 읽어드릴 수 있는 Colum의 수

Macro Explanation

Page 31: Automation for STAR-CCM+mdx2.plm.automation.siemens.com/sites/default/files... · 2018-05-06 · 현재 디렉토리 형태(java Script)에 모든 과정을 저장할 수 있다

변수생성

• Excel Data

Macro Explanation