This FemConstraint is used only by CFD (Computional Fluid Dynamics, FVM is more popular than FEM in this field) solver, OpenFOAM in the first instance, which is not merged yet. But this classes can be tested with FEM solver, bofore the CFD solver is available.
FemConstraint is categoried into 5 types (modelled after commerical CFD tools, CFX) and then many subtypes, to simplify cpp side coding. Only one such cpp class is needed for CFD, instead of >10 classes.
Both cpp and python code are developed in branch `foambuilder_pre2` in April 2016. After failed to rebase it to latest upstream. I decided to merge cpp part which is kind of stable, to reduce my work to manually merge with upstream master in the future. Python side code targeted on Oct to be merged after refactoring.
Instead of commit a big feature, fluidboudnary in cpp and FoamSovler in python, I am only capable of split pull request. I am very poor on git, I have not succeded in git rebase for one year.
3D render is not tweaked, it based on ConstraintForce adn ConstraintFixed, with changed color to distinguish different subtype
I can see some warning on EOL, I hope github can solve it.
#warning: LF will be replaced by CRLF in src/Mod/Fem/App/AppFem.cpp.
#The file will have its original line endings in your working directory.
3 commits, tested passed in GUI. Ubuntu 16.04 64bit
Function can be tested by
Code: Select all
#test macro App.newDocument("Unnamed") App.setActiveDocument("Unnamed") App.ActiveDocument=App.getDocument("Unnamed") Gui.ActiveDocument=Gui.getDocument("Unnamed") Gui.activateWorkbench("PartWorkbench") App.ActiveDocument.addObject("Part::Cylinder","Cylinder") App.ActiveDocument.ActiveObject.Label = "Cylinder" App.ActiveDocument.recompute() Gui.SendMsgToActiveView("ViewFit") Gui.activateWorkbench("FemWorkbench") import FemGui import FemAnalysis import FemSolverCalculix FemAnalysis.makeFemAnalysis('Analysis') FemGui.setActiveAnalysis(App.activeDocument().ActiveObject) FemSolverCalculix.makeFemSolverCalculix('CalculiX') FemGui.getActiveAnalysis().Member = FemGui.getActiveAnalysis().Member + [App.activeDocument().ActiveObject] App.activeDocument().addObject('Fem::FemMeshShapeNetgenObject', 'Cylinder_Mesh') App.activeDocument().ActiveObject.Shape = App.activeDocument().Cylinder Gui.activeDocument().setEdit(App.ActiveDocument.ActiveObject.Name) Gui.activeDocument().resetEdit() FemGui.getActiveAnalysis().Member = FemGui.getActiveAnalysis().Member + [App.activeDocument().addObject('Fem::ConstraintFluidBoundary', 'FluidBoundary')] #