Skip to content

상용 수준 개선: 성능·지지/하중·과도 열·UI 재디자인·비선형 해석·업데이트 - #4

Merged
knoxxr merged 16 commits into
mainfrom
ccr-b7884edd-wporz4
Nov 19, 2026
Merged

knoxxr merged 16 commits into
mainfrom
ccr-b7884edd-wporz4

Conversation

@knoxxr

@knoxxr knoxxr commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

요약

PR #3 이후 이 브랜치에서 한 작업을 한꺼번에 합칩니다.

해석 기능

  • 비선형 정적 해석: 강도 해석에 두 가지를 선택해 켤 수 있습니다.
    • 재료 항복(J2 소성, 3직선 경화)과 큰 변형(전체 라그랑주).
    • 판정은 세 가지입니다. 무너짐(도달 하중 %), 국부 항복(소성 변형률 0.2 % 이하), 영구 변형(그 초과)이고, 하중을 뺀 뒤 남는 변형도 계산합니다.
    • 결과 화면에 소성 변형률과 남는 변형을 볼 수 있고, PDF·CSV에도 반영했습니다.
    • 접촉·볼트가 있는 모델은 아직 지원하지 않아 체크리스트에 ✘로 표시합니다.
  • 지지 조건과 하중: 강제 변위, 탄성 지지, 원격 하중, 모멘트를 추가했습니다.
  • 과도 열 해석: 시간에 따른 열전달을 후진 오일러로 풉니다.

성능

  • 큰 정적 해석은 구속을 소거한 뒤 p-멀티그리드 CG로 풉니다. 94k DOF 기준 18 s → 3.6 s입니다.

화면과 사용성

  • UI를 다시 디자인했습니다. 디자인 토큰, 밝은/어두운 테마, 단계 표시, 시작 화면이 들어갔습니다.
  • 실행 취소/다시 실행과 해석 전 크기·시간 예상을 추가했습니다.
  • 문의하기·후원하기·업데이트:
    • 문의하기는 버전·환경을 미리 채운 GitHub 이슈를 엽니다.
    • 후원하기는 GitHub Sponsors 페이지를 엽니다.
    • 업데이트는 GitHub Releases에서 확인하고, 설치 파일을 받아 SHA-256으로 검증한 뒤 설치합니다. 저장소가 비공개라 읽기 전용 토큰이 필요합니다.

수정

  • 독립 리뷰에서 나온 결함 12건을 고쳤습니다.
  • 다른 모델을 열면 1단계로 돌아갑니다.
  • 원격 하중 오프셋 입력을 축마다 한 줄로 나눴습니다.

배포 준비

  • 코드 서명·공증은 선택 사항으로 준비했고, 체크섬과 GitHub Release 업로드를 추가했습니다.

테스트

  • 일반 테스트 153개와 UI 테스트 30개가 통과했습니다. UI 테스트는 VTK 세그폴트를 피하려고 하나씩 따로 실행했습니다.
  • 새 해석 기능마다 이론해 비교 테스트가 있습니다: test_fem_nonlinear, test_plasticity, test_fem_supports, test_fem_transient.
  • 실제 GitHub 릴리스로 업데이트를 끝까지 받아 설치해 보지는 못했습니다. 아직 릴리스가 없습니다.
  • CI 러너가 배정되지 않아 CI는 실행되지 않습니다(GitHub Actions 결제·설정 문제).

Generated by Claude Code

A TET10 mesh holds a TET4 mesh on its corner nodes; smoothing on the
quadratic system and correcting on that linear one gives a CG iteration
count that does not grow with the mesh (22-26). Measured on the sample
models: bracket 94k DOF 18.0 s -> 3.6 s, 260k DOF ~48 s (AMG) -> 13.9 s,
two bonded plates 43k DOF 8.9 s -> 2.6 s, bolted plates with preload 82k
DOF 55 s -> 6.4 s; two bonded plates at 163k DOF did not converge at all
with AMG and now take 9 s.

Penalty rows stall the iteration, so Constraints.elimination() removes
ties, pins and inclined rollers exactly (u = T u^) and reactions of
equation-based fixtures come from multipliers. Models that cannot be
eliminated, are singular or do not converge fall back to the existing
factorization, which also keeps diagnosing unheld parts. Contact, modal
and buckling solves are unchanged.

Also: batched matmul for element stiffness (0.94 s -> 0.60 s at 18k
elements) and a sparse scatter for stress averaging.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A9NzuHPqp7Wrrs8zF7CMvh
Wrong verdicts
- Singularity detection compared flat facet normals, so the seam of a hole
  wall split in two faces and the tangent line of a fillet counted as sharp
  concave corners: a real stress concentration was excused and a plate with
  a hole went from 'caution' (1.26) to 'safe' (2.48). The bend is now
  measured with the quadratic surface normals at the shared edge.
- Fatigue used the raw peak inside a singular zone, so the sample bracket's
  verdict followed the mesh grade (1.50 / 1.36 / 1.19). Ductile parts are
  now assessed outside the zone, with a note about the corner.
- Brittle materials were checked in tension only: cast iron crushed at
  1000 MPa was '100x safe'. Compression is checked against a compressive
  strength (new material field, tensile strength when unknown).
- A part with no thermal path to a temperature reference came out at 0 C
  without a word; it is now reported by name.

Solver
- Radiation used a secant coefficient in a plain fixed-point loop and
  diverged from about 5 W; a Newton tangent converges in 6-13 passes.
- Thermal heat in/out were netted (a bar passing 4 W showed 0 W / 0 W).
- A bearing load's axial component was dropped silently; it is refused.

Files and import
- Saving wrote the target in place; a failure half-way destroyed the
  project (and the autosave). Now written aside and swapped in.
- A damaged .kst raised zlib/BadZipFile/TypeError past the UI's handler.
- 3MF files in inch, metre, centimetre or foot were read as millimetres.
- FBX: every mesh took its top ancestor's name; malformed files raised
  raw ValueError/IndexError.
- Touching faces within the tolerance were rejected by an exact boolean.
- Unnamed STEP parts showed the exporter's placeholder
  ('Open CASCADE STEP translator 8.0 1').

Reports
- The PDF used the full project while the result covers the visible parts
  only: a hidden part's fixture crashed it, its loads were listed.
- Notes and thermal headlines hard-coded MPa / mm / C in US projects,
  the default number format fell into exponent notation at 10^4, an
  oblique axis was described as 'X', and the thermal report claimed
  radiation and k(T) were not considered.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A9NzuHPqp7Wrrs8zF7CMvh
…, welcome page

The window used Qt's default look. ui/theme.py now holds the colour tokens
of a light and a dark theme and builds palette and style sheet from them;
no widget hard-codes a colour any more.

- Header bar with the product name, line icons painted in code and the
  help / report / theme / about actions on the right.
- The seven steps are a horizontal stepper with number badges, ticks for
  completed steps and connectors, which frees about 200 px of height for
  the step's content (the result summary was cut off before).
- Without a project the right pane is a welcome page (open model or
  project, the three samples, recent files) instead of an empty 3D view.
- One filled primary button per panel, section labels, hints, a verdict
  card with a coloured edge, slim scroll and progress bars, styled check
  boxes and radio buttons.
- Dark theme, switched from the header and remembered; the 3D background,
  edges and scalar bar text follow it.
- The bundled Noto Sans KR is the UI font on every platform. It is a
  variable font whose default instance is Thin, so the weight axis is set
  explicitly.

Fixes found on the way: the '?' of a hidden load row stayed behind on its
own, long option texts pushed panels wider than the side bar, and label
visibility was derived from isVisible() of a control that is not shown yet.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A9NzuHPqp7Wrrs8zF7CMvh
Undo / redo (Ctrl+Z, Ctrl+Y, header buttons): the history is a stack of
project documents, the same data the project file stores, so everything
that is saved can be undone and nothing else needs bookkeeping. Up to 50
steps; the mesh is kept when the mesh preset, refinements and visible
parts are unchanged, results are always dropped. project_io gains
to_document / from_document, which save and load now go through.

The solve step shows the size of the run (elements, unknowns) and a rough
duration in ranges, with a warning and advice when a contact, modal or
buckling model is too large; the progress line counts the seconds and the
status bar reports the total when the run finishes.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A9NzuHPqp7Wrrs8zF7CMvh
Opening a model while a result was shown kept the previous model's
verdict card on screen: the navigator had disabled the result step but
the panel stack stayed on it. The samples' parts are named in Korean
instead of after the temporary file ("kstruct_bracket").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A9NzuHPqp7Wrrs8zF7CMvh
Fixtures
- Prescribed displacement: chosen faces move by a given amount per axis
  (unticked axes stay free). Solved as u = u_set + K^-1 (f - K u_set);
  the contact solver carries the imposed movement into gaps and anchors
  and ramps it with the friction increments; the multigrid path is used
  when no constraint equation passes through a moved DOF. The fixture's
  reaction is the force needed to impose the movement.
- Elastic support: a spring foundation of given total stiffness (N/mm)
  normal to the faces, as a consistent surface stiffness added to K in
  static, modal and buckling runs; its reaction is the spring force.

Loads
- Remote force: a force at a point away from the faces, passed on as if
  through a rigid fitting (force plus the moment of its offset).
- Moment: bending or twisting moment on any faces.
  Both use one distribution: area-weighted force share plus w_i (a x r_i)
  with a = J^-1 M, which reproduces resultant and moment exactly and is
  the linear distribution of beam theory.

Checked against closed forms: a bar stretched by delta (sigma = E delta/L,
also through multigrid and through two blocks in contact), a bar on a
spring foundation (F/k + FL/EA), a cantilever under an end moment
(ML^2/2EI and Mc/I) and under a remote force (force + moment terms).
Panels, descriptions, 3D markers, help texts and the project file cover
all four.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A9NzuHPqp7Wrrs8zF7CMvh
The thermal analysis can now follow a part warming up or cooling down:
'시간에 따른 변화' in the solve step with a duration and a starting
temperature. Backward Euler in 60 steps on (K + C/dt) T = f + C/dt T_prev
with the consistent heat-capacity matrix; linear problems factorize once,
radiation and temperature-dependent conductivity are linearised at the
previous step. No temperature reference is needed (heat input alone
warms the part); a material without specific heat is reported.

The result panel offers 21 moments on one colour scale, the verdict
follows the hottest moment of the run, the headline and the report say
how long was computed, and a strength run with heat conditions uses the
temperature at the end of the duration.

Checked against the Fourier-series solution of a bar heated from one end
(within 2 % of the rise at every node), against the steady state after a
long time, and for exact energy conservation under pure heat input.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A9NzuHPqp7Wrrs8zF7CMvh
…ms, GitHub Release

packaging/build.py signs when a certificate is configured and builds
unsigned as before otherwise:
- Windows: KSTRUCT_SIGN_PFX (+ password) through signtool with an RFC 3161
  timestamp, or KSTRUCT_SIGN_COMMAND for cloud / hardware-token signing;
  both the frozen KStruct.exe (before Inno Setup packs it) and the setup.
- macOS: hardened-runtime codesign of the .app with the entitlements a
  PyInstaller bundle needs, then notarytool submit + stapler on the .dmg.
- Every build writes SHA256SUMS.txt.

The CI workflow fills these from repository secrets when they exist and a
pushed v* tag publishes the installers and one checksum file to a GitHub
Release. docs/RELEASE.md lists the certificates and secrets to obtain and
what remains outside the code (EULA, the CI runner problem).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A9NzuHPqp7Wrrs8zF7CMvh
…st items

Three spin boxes side by side made the load panel wider than the side bar
and cut off its buttons and list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A9NzuHPqp7Wrrs8zF7CMvh
Distribution work (code signing certificates, EULA, sales documents) is
dropped from the to-do list; the optional signing step stays and does
nothing without a certificate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A9NzuHPqp7Wrrs8zF7CMvh
fem/plasticity.py: von Mises plasticity with isotropic hardening on a
trilinear curve (E to the yield strength, a tangent modulus to the tensile
strength, then almost flat), radial return and the consistent tangent.
The tangent modulus is a new optional material field; without it the
tensile strength is reached at 10 % strain.

fem/nonlinear.py: total Lagrangian elements (Green-Lagrange strain, second
Piola-Kirchhoff stress, initial-stress stiffness) and a load-controlled
Newton solver with a tangent predictor, backtracking, adaptive increments
and step halving; where the load cannot be carried it stops and reports the
share reached. A part that yielded is unloaded to report the permanent
deformation. Constraints are eliminated exactly where possible (multigrid
CG for large systems), else by penalty; reactions as in the linear solver.
Contact and bolts are refused for now. The strength analysis uses it when
Project.plasticity / large_deformation is set.

Checked against closed forms: the bilinear uniaxial response under imposed
stretch and under force, the permanent stretch after unloading, the limit
of a nearly non-hardening bar, the elastica of a slender cantilever with
P L^2/EI = 1 (0.3017 L down, 0.0564 L inwards, within 3 %), and the linear
answer (displacements and reactions) below yield with ties, a pin, rollers
and an elastic support. The consistent tangent is checked by finite
differences on both hardening branches.

Also: GPL dependencies are allowed now that the tool is for in-house use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A9NzuHPqp7Wrrs8zF7CMvh
Solve panel switches for yielding and large deformation (with help), checklist
blocks contact/bolts, result fields for plastic strain and the shape left after
unloading, verdict from plastic strain / collapse load, PDF method text, CSV
column, estimate wording, UI test, docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A9NzuHPqp7Wrrs8zF7CMvh
…to the peak

Ductile parts that yielded are judged on their plastic strain in the part list and
the PDF table too, so the part verdict no longer contradicts the overall one; the
plastic strain colour scale stretches to its peak so a small yielded spot shows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A9NzuHPqp7Wrrs8zF7CMvh
문의하기 opens a pre-filled GitHub issue (also from the crash dialog), 후원하기 the
GitHub Sponsors page. Updates: start-up check once a day and an update dialog that
reads the private repository's latest release with a token, downloads this platform's
installer, verifies it against SHA256SUMS.txt and runs it (Windows: silent setup that
restarts the app). The token is dropped on the redirect to the storage host.
Right-hand toolbar group is icon-only so it fits at 1280 px.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A9NzuHPqp7Wrrs8zF7CMvh
@knoxxr
knoxxr merged commit 8965a13 into main Nov 19, 2026
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants