Skip to content

CaeAnalysis CaeSolver and an example concrete FoamCfdSolver added

Jonathan Wiedemann requested to merge github/fork/qingfengxia/foamsolver into master

Created by: qingfengxia

changelog for pull request

In addition to C++ Fem::SolverObject, python side are added to extend FemSolverObject into Solver specific CaeSolver, like FoamCfdSolver.py ccxFemSolver.py. CaeSolver.py implements a factory pattern to make solver instance from string name.

CaeAnalysis.py: Extending FemAnalysisObject into CaeAnalysis. This module implements all functions in "MechanicalAnalysis.py, _ViewProviderFemAnalysis.py, _FemAnalysis.py, _CommandNewMechanicalAnalysis.py". These files are not removed to ease the merge conflict with official master, but their function/code is not used. These files should be deleted soon after this commit is accept.

_AnalysisControlTaskPanel.py is a super set of the existent_JobControlTaskPanel.py + future general CaeSolver control (retrieve information only from CaeSolver). This file is manually updated once _JobControlTaskPanel.py is updated, but I have no time to maintain this kind of merge/compatiblity any longer.

Multiple analysis can be saved into document and reloaded, but macro (FemExample.py) replay is not perfect, as MechanicalMaterial.py/ Meshing does not record GUI operation.

http://forum.freecadweb.org/viewtopic.php?f=18&t=13016&sid=58ff5c1ac03b66aac6e6dca069f19207

Testing

I have tested on 2PC for the 1CFD + 2FEM analyses. UnitTest passed FoamAnalysis will fail on your PC, but it does not matter quick test can be done by paste FemExample.py

P.S.

Rebased to official master (Nov 01), while my github fork still shows a long list of commit.

Forgive my poor git level, a lot of my commits in Oct on foamsolver fork is not consistent, I hope you do not need to play commit one by one, which will fail. I have git rebase on Nov 01. foamsolver can be merged into master.

I will "git commit --amend" to tweak the code according to reviewing advice, does the pull request still valid?

Merge request reports