Abaqus writer, write group data

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
bernd
Posts: 9299
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Abaqus writer, write group data

Postby bernd » Thu Nov 23, 2017 5:34 am

Lately I did extend the Abaqus writer. It is possible to write mesh groups to inp file. Once the PR is in master https://github.com/FreeCAD/FreeCAD/pull/1111 it works as follows ...

by Python:

Code: Select all

# reads the params from import/export preference GUI
App.ActiveDocument.FEMMeshGmsh.FemMesh.write('/home/hugo/Desktop/groups/femmeshgroups2esets2.inp')

# uses the prefs passed with the method
App.ActiveDocument.FEMMeshGmsh.FemMesh.writeABAQUS('/home/hugo/Desktop/groups/femmeshgroups2esets2.inp', 0, True)

''' while
elemParam:
0 = all elements
1 = highest elements only
2 = FEM elements only (only edges not belonging to faces and faces not belonging to volumes)

groupParam:
true = write group data
false = do not write group data
'''
On Gui just make your import/export prefs and export a mesh to inp.

example file attached ...
Attachments
femmeshgroups2inpsets.fcstd
(20.02 KiB) Downloaded 18 times
User avatar
HarryvL
Posts: 1071
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: Abaqus writer, write group data

Postby HarryvL » Sat Mar 10, 2018 6:05 pm

Hi Bernd, this is a great feature. I plan to use it in CGX to review stress results in (hidden) Mesh regions of interest. Would it be possible to also export all group data to the CCX INP at the point of clicking "Write .inp file" before starting a CalculiX analysis? That saves me manually merging CCX input files. Thanks, Harry
User avatar
HarryvL
Posts: 1071
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: Abaqus writer, write group data

Postby HarryvL » Sun Mar 11, 2018 4:31 am

Sorry Bernd, I think this is not as easy as I imagined. After trying *NODE FILE, NSET=Nset_name and *EL FILE, NSET=Nset_name (where Nset_name is a node set exported by FreeCAD) I found that you can only toggle a region in the CGX pre-processor (plot n Nset_name) and not the post-processor. Results are only shown for NSET, but the mesh for all other nodes stays visible (see below). Things become even more complicated when CCX introduces new nodes (OUTPUT=3D).

RHS_1.png
RHS_1.png (47.07 KiB) Viewed 562 times

So from a CGX point of view there is not much justification for writing mesh regions to INP

Harry
fandaL
Posts: 355
Joined: Thu Jul 24, 2014 8:29 am

Re: Abaqus writer, write group data

Postby fandaL » Sun Mar 11, 2018 8:55 am

HarryvL wrote:
Sun Mar 11, 2018 4:31 am
Sorry Bernd, I think this is not as easy as I imagined. After trying *NODE FILE, NSET=Nset_name and *EL FILE, NSET=Nset_name (where Nset_name is a node set exported by FreeCAD) I found that you can only toggle a region in the CGX pre-processor (plot n Nset_name) and not the post-processor. Results are only shown for NSET, but the mesh for all other nodes stays visible (see below). Things become even more complicated when CCX introduces new nodes (OUTPUT=3D).
RHS_1.png
So from a CGX point of view there is not much justification for writing mesh regions to INP
open frd file in cgx
read inp file sets from input file by

Code: Select all

read job_name.inp nom
display nsets and elsets by

Code: Select all

prnt se
plot desired elset by e.g.

Code: Select all

plot e SolidMaterialSolid
use gui to plot stresses or so
You can farther look at cgx manual or to examples at https://github.com/mkraska/CalculiX-Examples
User avatar
HarryvL
Posts: 1071
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: Abaqus writer, write group data

Postby HarryvL » Sun Mar 11, 2018 9:13 am

Thanks fandaL, exactly what I needed :D

RHS_detail.png
RHS_detail.png (24.25 KiB) Viewed 542 times
User avatar
bernd
Posts: 9299
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Abaqus writer, write group data

Postby bernd » Sun Mar 11, 2018 10:13 am

HarryvL this should not be to difficault to add as a pref. I will have a look when I have a minute.

bernd
User avatar
bernd
Posts: 9299
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Abaqus writer, write group data

Postby bernd » Sun Mar 11, 2018 12:43 pm

you can change this easily yourself for any analysis CalculiX inputfile writing by replaceing the False by a True in the file Mod/Fem/femsolver/calculix/writer.py in your Mod folder of FreeCAD.

https://github.com/FreeCAD/FreeCAD/blob ... ter.py#L81

to find the Mod folder you can put in this in your FreeCAD python console:

Code: Select all

FreeCAD.ConfigGet("UserAppData")
Bernd
User avatar
HarryvL
Posts: 1071
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: Abaqus writer, write group data

Postby HarryvL » Sun Mar 11, 2018 1:52 pm

Great, thanks :)