Simcenter STAR-CCM+ 플로팅 포인트 에러(Floating Point Error) 발생시 원인 파악 및 해결 방법

2022-03-22T07:36:46.000-0400
Simcenter STAR-CCM+ Simcenter STAR-CCM+ Virtual Reality Teamcenter Share Simcenter Cloud HPC Simcenter STAR-CCM+ Viewer Simcenter STAR-CCM+ Application Specific Solutions

요약

대부분의 플로팅 포인트 에러는 해의 발산과는 상관없이 해석이 잘 진행되다가 아무런 특이점 없이 해석이 종료 되는 경우가 많다. 이런 경우 원인과 해결방안 파악이 어렵다. 본 글에서는 플로팅 포인트 에러 발생시 원인 파악 방법과 해결 방법에 대해 기술 하고자 한다.


세부 정보

  1. 플로팅 포인트 에러(Floating Point Error) 증상
플로팅 포인트 에러는 잔차(residual)의 증가나 속도 압력등의 증가등의 현상을 보이지 않는 경우가 대부분이다. 모니터링 값으로만 보면 문제없이 잘 수렴되는 것처럼 보이지만 특정 시점(iteration/time)에 불규칙하게 발생하게 된다. 에러 메시지는 아래와 같이 iteration에 따라서 여러 residual값들이 잘 수렴되고 있지만, 갑자기 플로팅 포인트 에러가 발생하게 된다. 에러가 발생하면 아래와 같이 에러 메시지를 보여 주고 해석이 저장된 후 종료 된다. 이렇게 저장된 파일을 다시 해석 하면 아무 문제 없이 최종 종료 되는 경우도 있고 다시 몇 iteration 진행 후 플로팅 포인트 에러가 발생하게 될 수도 있다.

Iteration     Continuity     X-momentum     Y-momentum     Z-momentum            Tke            Sdr
          2576   9.240446e-08   8.102620e-06   3.748366e-06   3.036221e-06   2.963755e-05   1.726431e-03
          2577   9.224399e-08   8.075741e-06   3.731813e-06   3.025256e-06   2.956513e-05   2.163701e-03
          2578   9.199928e-08   8.047124e-06   3.715207e-06   3.012666e-06   2.948776e-05   1.686866e-03
          2579   9.172513e-08   8.016819e-06   3.698343e-06   2.998791e-06   2.940669e-05   2.136377e-03
          2580   9.147917e-08   7.986289e-06   3.681004e-06   2.985508e-06   2.932400e-05   1.693971e-03
          2581   9.125993e-08   7.954836e-06   3.663138e-06   2.972562e-06   2.924124e-05   2.176786e-03
          2582   9.101952e-08   7.923016e-06   3.644755e-06   2.959440e-06   2.915858e-05   1.969598e-03
          2583   9.081804e-08   7.891668e-06   3.626911e-06   2.946625e-06   2.906143e-05   2.426139e-03
A floating point error has occurred. The following error has been logged:
  floating point exception [overflow], the specific cause cannot be identified
Please refer to the troubleshooting section of the User's Guide.
Command: StepSimulation
   error: Server Error
star.base.neo.ClientServerObject$CommandCompleteObserver.waitFor(ClientServerObject.java:1242)
star.base.neo.ClientServerObject.executeAndWait(ClientServerObject.java:1072)
star.common.SimulationIterator.step(SimulationIterator.java:303)
star.common.SimulationIterator.step(SimulationIterator.java:246) 
  1. 플로팅 포인트 에러 진단 방법
플로팅 포인트 발생시 원인 파악을 위해서는 STAR-CCM+ 실행 시 옵션 명령어 중에 -fpe를 추가하면 된다. -fpe를 추가하면 어떤 물리 모델에서 발생하는지 파악할 수 있고, 파악이 끝나면 모델을 수정하면 된다. 한 예시로, -fpe 추가 했을 때 나오는 에러메세지는 아래와 같다. 이 메시지에서는 k-omega turbulent 모델에서 발생했음을 알 수 있다. 이런 경우 K-omega 모델의 옵션을 수정하면 문제가 해결 될 수 있다. 문제해결이 잘 안될 경우에는 담당 기술지원 엔지니어에게 아래와 같은 에러 메시지를 알려주고 기술 지원 요청을 하면 된다.

Iteration     Continuity     X-momentum     Y-momentum     Z-momentum            Tke            Sdr
1138   3.035581e-07   3.033218e-05   1.281180e-05   1.379740e-05   1.211350e-04   5.080065e-03
SIGFPE: floating point exception
Processor: 9
   Recoverability: Non-recoverable
   ServerStack: [
libStarNeo.so: SignalHandler::signalHandlerFunction(int, siginfo*, void*),
libpthread.so.0(+0xf630),
libKwTurbModel.so(+0x50d533),
libKwTurbModel.so(+0x109234),
libStarSolve.so(+0x156a6d),
libStarSolve.so: CellTerm::evaluate(FvDomain const&),
libKwTurbModel.so(+0x5099f9),
libKwTurbModel.so: KwTurbDeformationEquation::update(Continuum const&, FvDomain const&),
libFlowModel.so: FlowModel::notifyVelocityGradientObservers(Continuum const&, FvDomain const&) const,
libCoupledFlowModel.so: CoupledFlowModel::notifyGradientObservers(FvRepresentation const&),
libCoupledFlowModel.so: CoupledImplicitSolver::discretize(FvRepresentation const&, float, LinearEqnSystem const*, bool const&, bool) const,
libCoupledFlowModel.so: CoupledImplicitSolver::iterationUpdate(NamedResiduals&),
libStarSolve.so: RunnableSolver::doSolverIterationUpdate(SolverManager const&, NamedResiduals&),
libStarSolve.so: RunnableSolver::iterate(),
libStarSolve.so: SimulationIterator::startSimulation(RunnableSolver*, int, SimulationIterator::RunMode, bool),
libStarSolve.so(+0x296ad4),
libStarNeo.so: Controller::executeCommand(Command&, Properties const&, Properties&),
libStarNeo.so: Controller::executeCommand(Properties const&, Properties&),
libStarMachine.so: CommandController::SlaveCommandLoop::start(),
libStarMachine.so: CommandController::processCommands(),
libStarMachine.so: Machine::main(int, char**)]
   ServerState: exiting
   Signal: SIGFPE: floating point exception
   error: Internal Error
  1. 플로팅 포인트 에러 해결 방법
위에서 언급한 -fpe 명령어를 통한 원인 파악을 한 후, 해결 방법은 다음과 같다.
  1. 모델 변경
-fpe를 통해 파악한 물리모델의 옵션을 변경하거나, 대체 가능한 모델이 있다면 모델을 변경하면 문제를 해결 할 수 있다.
  1. Precision 변경 또는 상위 버전 사용
모델 변경이 불가능한 경우는 동일 버전의 precision을 변경하여 해석하거나, 상위 버전을 사용하게 되면 문제를 해결 할 수 있다. Mixed precision을 사용했다면 double precision(-R8)으로 변경하면 된다.
  1. Reoder mesh
해석 초기와 전에 Reoder Mesh를 하게 되면 문제가 해결 될 수 있습니다. 경험상 Reoder mesh는 큰 효과는 없지만 fpe발생을 조금 지연할 수는 있습니다.

image.png

KB 자료 ID# KB000049016_KO

내용

요약세부 정보

관련 구성 요소

Design Manager Electronics Cooling In-Cylinder (STAR-ICE) Job Manager Simcenter STAR-CCM+