[PDF] PYTHON API TO RUN CALCULIX: PYCALCULIX



Previous PDF Next PDF







Getting Started with CalculiX - bConverged

CalculiX Command window [Start] [Programs] [CalculiX] [CalculiX Command] or start the Launcher [Start] [Programs] [CalculiX] [Extended Version][CalculiX Launcher] K: If using a command line, start cgx by typing "cgx -b beam fbd" (without the ""), press enter (E) If using the Launcher, open a new file named "beam fbd" with CGX



CalculiX CrunchiX USER’S MANUAL version 2

CalculiX CrunchiX USER’S MANUAL version 2 7 Guido Dhondt March 2, 2014 Contents 1 Introduction 15 2 How to perform CalculiX calculations in parallel 16



Calculix FEA Beam Part 1: Buliding Geometry and Meshing

Calculix FEA Beam Part 1: Buliding Geometry and Meshing This article is the first segment of several related to CalculiX This magnum opus of open source is a full non-linear finite element package running on linux, windows, and mac It is divided into two primary programs, cgx and ccx The first of the two Calculix



CalculiXUSER’SMANUAL -CalculiXGraphiX,Version27-

This document is the description of CalculiX GraphiX (cgx) This program is designed to generate and display finite elements (FE) and results coming from CalculiX CrunchiX (ccx) If you have any problems using cgx, this document should solve them If not, you might send an email to the author [3] The Con-



Crash course- CalculiX Part I

application Calculix Calculix is a free and open source finite element analysis application Originally it was written for Linux but meanwhile there is a Windows version It has an implicit and explicit solver Calculix is written by Guido Dhondt and a pre and post processor (CGX) is written by Klaus Wittig



PYTHON API TO RUN CALCULIX: PYCALCULIX

Dec 22, 2014 · 5 Solve file (4 Calculix CCX) 6 Look at results in gui (5 Calculix CGX) Pycalculix 1 Make geometry 2 Apply Loads + Constraints 3 Call mesh method* 4 Make solver instance + solve** 5 Look at results *GMSH used in the background **Calculix CCX used in the background New Pycalculix workflow allows for more streamlined model building and



Building Calculix with Code Blocks - MYSTRAN

Method ) Calculix is exactly the technology require to simulate the entire function of the jet engine, IMHO Integrated Development Environment (IDE) The tools used to control the actual build of Nastran in the 1960s included a Compiler and a Linker and since the makefile utility was created by Feldma in April 1976, it certainly didn’t have make



CalculiXUSER’SMANUAL -CalculiXGraphiX,Version215-

This document is the description of CalculiX GraphiX (cgx) This program is designed to generate and display finite elements (FE) and results coming from CalculiX CrunchiX (ccx) If you have any problems using cgx, this document 7



BASIC MANUAL TO WORK WITH CGX - Wikimedia

BASIC MANUAL TO WORK WITH CGX This is a document where it is explained in simple way how to build some simple geometries in Calculix First we star giving a short information about the intalation of Calculix; for that do the following:



[PDF] calcul en ligne ce2

[PDF] calcul en ligne cp

[PDF] calcul en ligne ce1

[PDF] eduscol initiation a la programmation

[PDF] calcul en ligne cm2

[PDF] eduscol maths cycle 3

[PDF] calcul en ligne cm1

[PDF] eduscol grandeurs et mesures

[PDF] quelle est la formule pour calculer la puissance p consommée par un appareil en courant continu ?

[PDF] calculer l'énergie en joule

[PDF] formule datedif en anglais

[PDF] datedif en francais

[PDF] calculer le nombre d'heures entre deux dates excel

[PDF] loi normale ecart type inconnu

[PDF] cours d'excel approfondi en pdf

PYTHON API TO RUN CALCULIX: PYCALCULIX

2014-12-22

Justin Black

Mechanical Engineer

Justin.a.black@gmail.com

www.justinablack.com

WHAT AND WHY

What: I created an API in python to build, solve and analyze mechanical engineering Finite

Element Analysis models of parts

Forces, displacements, gravity etccan be applied to a part and displacements and stresses can be displayed and queried Why? The existing free tools are very capable but not very automatable or user friendly To make a model currently, you have to learn 4 programs, I reduced that to one

FINITE ELEMENT ANALYSIS+ PYCALCULIXCAPABILITIES

Mechanical engineers can analyze parts using finite element anlaysiswhere parts are cut into tiny square or triangular elements, and deflections stresses etcare calculated in each element and on the corner nodes. This method and similar methods are used in industry to analyze both solid metal parts and even analyze fluid flows. In my case I limited my API to relatively simply types of 2D problems:

1.Plane Stress: 2d parts that are very thin, example: pulling on a plate

2.Plane Strain: 2d parts that are very thick, example: a dam

3.Axisymetric: a 3d part which is a 2d area revolved around an axis: jet engine case or

rotor

WORKFLOW

Original

1.Make part file (1 CAD Program)

2.Mesh part in program (2 GMSH)

3.Edit mesh file to remove junk (3 TXT)

4.Write solver .inpfile (3 TXT)

5.Solve file (4 CalculixCCX)

6.Look at results in gui(5 CalculixCGX)

Pycalculix

1.Make geometry

2.Apply Loads + Constraints

3.Call mesh method*

4.Make solver instance + solve**

5.Look at results

*GMSH used in the background **CalculixCCX used in the background New Pycalculixworkflow allows for more streamlined model building and solution. Manual editing of files eliminated. Original workflow used 5 programs. All aspects of the workflow are accessed in one python program, Pycalculix.

QUICK START EXAMPLES IN GITHUB

HTTPS://GITHUB.COM/SPACETHER/PYCALCULIX

FileProblem DescriptionElement/Problem Type

example1_dam.pyPlane strain analysis of pureconcrete dam

Plane strain

example2_hole_in_plate.pyPlane stress analysisof hole in plate, quarter symmetry

Plane stress

example3_compr_rotor.pyAxisymmetric analysis ofjet engine compressor rotor with blade (blisk)

Axisymmetric

example4_hole_kt.pyDesignstudy varying size of hole in plate, verifies the tension Ktsfrom

Calculixare consistent with textbook

answers

Plane stress design study

example5_times_dam.pyExample 1 redone with multiple time steps

Plane strain

PYCALCULIXREQUIREMENTS, PG1

Pycalculix.py file must currently be in the same folder as the model you are running

Python 3+* must be installed

CCX must be installed

Matplotlib* must be installed (used to make plots of parts + results) Numpy* must be installed (this is used to find principal stresses)

*Python, Numpy, and Matplotlibare all installed in the Anaconda distribution:http://continuum.io/downloads#py34

PYCALCULIXREQUIREMENTS, PG2

H·YH OMUG-coded in the paths to:GMSH, CCX, and CGXIn pycalculix.py: One option would be to require the user to pass the paths when instantiating the FEA model [DONE]

Another would be to distribute the programs with my library, and install my library with pipi(python package manager). I plan on implementing this in future releases

EXAMPLE: ANALYZING A DAM (BEETALOO DAM)PLANE STRAIN

Make part

Assign material

Solve model

View Results

Mesh part

Apply constraints

Apply pressures

Apply gravity

File: example1_dam.py

EXAMPLE: HOLE IN PLATEUNDER TENSIONPLANE STRESS

Make part

Assign material

Solve model

View Results

Mesh part

Apply constraints

Apply pressures

File: example2_hole_in_plate.py

EXAMPLE: COMPRESSOR DISK OR TURBINE DISKAXISYMMETRIC

Make part

Assign material

Solve model

View Results

Mesh part, set thickness on airfoil

Apply constraints

Apply speed

File: example3_compr_rotor.py

EXAMPLE: DESIGN STUDYPETERSON TENSION HOLE IN PLATE, PG1 (meters)

Make part

Assign material

Mesh Part

Apply constr+ press

Solve model

Extract Kt

(Pa = N/(m^2))

Run multiple models with a range of plate

widths, using a constant hole size.

Compare CalculixFEA results with Peterson

predicted results.

File: example4_hole_kt.py

EXAMPLE: DESIGN STUDYPETERSON TENSION HOLE IN PLATE, PG2

Run multiple models with a range of plate

widths, using a constant hole size.

Compare CalculixFEA results with Peterson

predicted results.

D/h = .45

D/h = .50

Error may be higher

Because only one element

on this corner

All other runs had 2 like below

CalculixFEA results are accurate to within

1BD RI 3HPHUVRQ·V UHVXOPVB (UURU ÓXPS LV

probably due to layout of local elements.

19 elements used on arc, 2ndorder trisused

File: example4_hole_kt.py

EXAMPLE: DAM ANALYSIS W/ MULTIPLE TIME STEPS

File: example5_times_dam.py

Time=1s

Gravity

Water Pressure

Air pressure

Time=2s

Gravity

Air pressure

Time=3s

Gravity

WALK THROUGH, HOLE IN PLATE, PG1EXAMPLE2_HOLE_IN_PLATE.PY

Import the pycalculixlibrary and define a model

This model will hold all of our geometry, materials, loads, constraints, elements, and nodes.

File: example2_hole_in_plate.py

WALK THROUGH, HOLE IN PLATE, PG2

GHILQH POH YMULMNOHV POMP RH·OO XVH PR GUMR POH SMUP

WALK THROUGH, HOLE IN PLATE, PG3

WALK THROUGH, HOLE IN PLATE, PG4

Chunking tells the program to try to cut the area into smaller pieces It cuts the part at points. It draws a perpendicular line then cuts the part with it.

Chunking can help you make a better quality mesh.It is required for CGX meshing, but not for GMSH meshing.

Area was chunked at P5

WALK THROUGH, HOLE IN PLATE, PG5

Sets the loads and constraints

Positive pressures push on the part. Negative pressures pull on the part. Note: we can do this either before or after meshing because the program stores loads on geometry (points, lines, areas) rather than the mesh.

WALK THROUGH, HOLE IN PLATE, PG6

Set the part material

WALK THROUGH, HOLE IN PLATE, PG7

Mesh the part

WALK THROUGH, HOLE IN PLATE, PG8

Make and solve the model.

Python console output on the right.

WALK THROUGH, HOLE IN PLATE, PG9

Query our results. Check the max stress and the reaction forces.

WALK THROUGH, HOLE IN PLATE, PG10

Plot our results.

Interactive plotting is suppressed with the display variable, but files are saved.

WALK THROUGH, HOLE IN PLATE, PG11, PLOTS

WALK THROUGH, HOLE IN PLATE, PG12, PLOTS

FUTURE WORK

Add element results plotting

Make lists for lines and signed lines (need to write a signed lines class)

Add struct-thermal and thermal support

Auto-detect contact regions between parts

Add compression supports

CAD import of brepand igsvia gmsh

CAD export via gmsh

Bolted joint example perhaps, nodal thickness on bolt and nut areas

CONCLUSION

HP·V QRR SRVVLNOH PR NXLOG JHRPHPU\ PHVO LP MSSO\ ORMGV MQG constraints, and plot and query results all in one place. One can now do design studies very easily with this tool.

Suggestions?

Feedback?

Please let me know at justin.a.black@gmail.com

quotesdbs_dbs5.pdfusesText_10