Welcome to the forums. Please post in English or French.

You are not logged in.

#1 Re: Code_Aster usage » [SOLVED] Problème lecture fichier MED » 2020-11-25 18:02:38

Hi, main contributor to the MED format of meshio here...

Yes you are right...the component names are not available hence we use the generic names V1, V2...

#2 Re: Code_Aster usage » Problem with rmed data processing in paraview? » 2020-07-27 12:31:03

You may try using the meshio Python package (github.com/nschloe/meshio) to convert rmed files to vtk / vtu / xdmf / ... formats readable natively by ParaView.

#3 Re: Code_Aster usage » 'Bus Error' during execution of parallel version 14.4 » 2020-06-23 14:40:19

You can use HDF5View (among others) to simply change the version of MED files, in the INFO_GENERALES section I think.

#4 Re: Code_Aster usage » 'Bus Error' during execution of parallel version 14.4 » 2020-06-23 13:58:47

I'll have a look if I can manage to find some time.

Could you please try if possible the previous v13 version by using

docker pull quay.io/tianyikillua/code_aster:v13

If v13 works for you it means there is some regression in my v14 version.

#5 Re: Code_Aster installation » [Solved] Compiling MPI version with PETsc on Ubuntu 18.04 » 2020-06-03 17:06:50

Thank you both for the info. I'll update the Docker image if I find sometime. Thanks

#7 Re: Code_Aster installation » [Solved] Compiling MPI version with PETsc on Ubuntu 18.04 » 2020-06-03 14:58:59

Hi, author of the Docker image here. Does all PETSc test cases work (for example petsc01a)? If so, I just need to update the Docker image to get everything working...

#9 Re: Code_Aster installation » Code_Aster inside a Docker container available for everyone » 2019-10-09 21:21:31

ok, now the 14.4 version (sequential and parallel) is also available as a Docker image, see the github page.

quay.io/tianyikillua/code_aster

Some issues with petsc

Also case tests are to be re-run. If someone could report on github it would be useful.

The old 13.6 version is available as quay.io/tianyikillua/code_aster:v13

#10 Re: Code_Aster installation » [SOLVED] configuring MUMPS with waf » 2019-10-09 15:47:58

I solved the "UnboundLocalError: local variable 'dvars' referenced before assignment" problem

Replace all

./waf ...

calls by

python3 waf ...

By the way the Docker images (github.com/tianyikillua/code_aster_on_docker) will be soon updated to 14.4

#11 Re: Code_Aster installation » Code_Aster inside a Docker container available for everyone » 2019-09-19 12:27:26

Could you please remove the left and right brackets?

docker run -ti --rm -e DISPLAY=192.168.44.176:0 -v %cd%:/home/aster/shared -w /home/aster/shared quay.io/tianyikillua/code_aster

#12 Re: Code_Aster installation » Code_Aster inside a Docker container available for everyone » 2019-09-19 09:33:56

1. Go to your working folder

cd /d E:/CODEASTER/example

2. Open Docker (you also accidentally added a $ before %cd%)

docker run -ti --rm -v %cd%:/home/aster/shared -w /home/aster/shared quay.io/tianyikillua/code_aster

#13 Re: Code_Aster installation » Code_Aster inside a Docker container available for everyone » 2019-06-14 08:29:54

Dear Sukumar,

Thank you for your remarks. As a matter of fact you can use `astk` with this Docker image, even under Windows.

59491059-7323d200-8e86-11e9-8bba-13f41012236f.png

1. For Windows users, download and open a X11 server via MobaXterm or vcXsrc, etc.
2. Get your IP address
3. Run (here for Windows users, note %cd%) in the directory containing simulations files

docker run -ti --rm -e DISPLAY=[YOUR IP ADDRESS]:0 -v %cd%:/home/aster/shared -w /home/aster/shared quay.io/tianyikillua/code_aster

Note: please replace

[YOUR IP ADDRESS]

by your actual IP address.

4. Run `astk` in your terminal. Voilà

#14 Re: Code_Aster usage » [SOLVED] Pre-processing » 2019-05-09 14:55:16

So here I have 4 points and 2 triangles and I want to see the "picture" of this mesh with my true eyes but without mental picturing it by looking at `points`and `cells`

import meshio
import numpy as np

# Nodes
points = np.array([
    [0, 0],
    [1, 0],
    [1, 1],
    [0, 1]
])

# Elements
triangles = np.array([
    [0, 1, 2],
    [0, 2, 3]
], dtype=int)
cells = {"triangle": triangles}

# Generate a VTU file readable by ParaView
meshio.write_points_cells("test.vtu", points, cells)  # WARNING: VTU requires 3D points, but 2D points given. Appending 0 third component.

# Generate a MED file readable by salome_meca and usable by code_aster
meshio.write_points_cells("test.med", points, cells)

# Generate an Abaqus INP file
meshio.write_points_cells("test.inp", points, cells)  # WARNING: Abaqus requires 3D points, but 2D points given. Appending 0 third component.

# ...other interface available, please see github.com/nschloe/meshio

# Re-read this INP file and check we retrieve the same
mesh = meshio.read("test.inp")
assert np.allclose(points, mesh.points[:, :2])  # ":2" comes from the previous warning
assert np.allclose(triangles, mesh.cells["triangle"])

The generated `test.med` can be read by gmsh and by code_aster for your calculation.

The generated `test.inp`:

*Heading
 Abaqus DataFile Version 6.14
written by meshio v2.3.7
*Node
1, 0.0, 0.0, 0.0
2, 1.0, 0.0, 0.0
3, 1.0, 1.0, 0.0
4, 0.0, 1.0, 0.0
*Element,type=S3RS
1,1,2,3
2,1,3,4
*end

#15 Re: Code_Aster usage » [SOLVED] Pre-processing » 2019-05-09 13:02:49

Check the meshio library "https hmm/github.com/nschloe/meshio"

You can import an Abaqus mesh (not complete, report back / open an issue there if your mesh can not be loaded) and then convert it to VTU/MED for instance to be read by ParaView or if you prefer Salome_meca (ParaVis?).

Cheeeers,

#16 Re: Salome-Meca usage » Python meshio » 2019-04-30 22:35:40

code-aster.org/forum2/viewtopic.php?id=23358

If you have specific questions regarding meshio you can also open an issue on the github page github.com/nschloe/meshio/issues

#17 Re: Code_Aster usage » [SOLVED] Regarding "point_tags" in meshio » 2019-04-15 21:52:14

In [7]: mesh.cell_data["triangle"]["cell_tags"]                                 
Out[7]: array([-2, -2], dtype=int32)

What do you mean by original node id / element id ?

For node id (N1, N2...), simply add 1.

mesh.points[3] correspond to N4

For element id, the ordering is preserved within each cell_type

So for your triangle elements, the first element  M5       N1       N2       N3 is represented by the first line of mesh.cells["triangle"][0]

If you want to retrieve M_ind from mesh.cells, you need to order cell types using the MED/aster rule: first 1d element ,then 2d , then 3d, then you can find M_ind.

#18 Re: Code_Aster usage » [SOLVED] Regarding "point_tags" in meshio » 2019-04-15 19:54:58

Hello!

I introduced the notion of `point_tags` and `cell_tags` in meshio (yes very recently). Didn't expect to see people actually using this library here since I haven't yet advertised here...However I consider this library to be very useful since meshio is pure Python and can be installed with `pip3 install meshio`. You can also read a (R)MED file and then convert it to XDMF / VTU so that you can read the mesh/result file directly under ParaView, without opening salome(_meca) à l'Obélix.

The design of these tags I proposed can be found here: https hmm/ github.com/nschloe/meshio/pull/352

1. The cells correspond well to your mesh, knowing that in Python indices begin with 0. "line" is the SEG2 element, while "triangle" is your TRIA3 element.

{'line': array([[0, 1],
        [1, 2],
        [2, 3],
        [3, 0]], dtype=int32), 'triangle': array([[0, 1, 2],
        [2, 3, 0]], dtype=int32)}

2. `point_tags` should indicate the node set that each node belongs to. `point_tags=[1 2 0 3]` says you have 3 node sets defined in your mesh:

You can see the set names corresponding to 1, 2 and 3 in `mesh.point_tags`.

mesh.point_tags =                                                         
{1: ['LEFT_SUPPORT',
  'H_SUPPORT'],
 2: ['H_SUPPORT'],
 3: ['LEFT_SUPPORT']}

the first node (0, 0, 0) belongs to node set 1: so it belongs both to 'LEFT_SUPPORT' and 'H_SUPPORT'
the 2nd node (1, 0, 0) belongs to node set 2: it belongs to 'H_SUPPORT'
the 4th node (0, 1, 0) belongs to node set 3: 'LEFT_SUPPORT'

Please also contact me at tianyikillua (at) gmail.com if you need further information.

Tianyi Li

#19 Re: Code_Aster usage » [SOLVED]Damage Models and Mesh dependency » 2019-02-26 17:02:27

From a physics point of view you need to use a non-local damage model that introduces an additional physical parameter (internal length) that characterizes the size of the damage process zone. By doing so the model becomes no longer inappropriately mesh dependent.

You can read for instance the document R5.03.25.

PS: I did a thesis on this subject in dynamics.

#20 Re: Salome-Meca usage » element node connectivity / integration point location information » 2019-02-18 11:51:30

Hello,

The Gauss points are defined by the specific elements, for example in this document r3.01.01

By the way, if you merely want to extract the field values contained in a MED, you can also use the generic Python library meshio (github.com/nschloe/meshio), there is a MED interface to which I contributed.

The advantage is that it's more lightweight and it can be used with general Python (so without salome packages).

#21 Re: Code_Aster installation » Code_Aster inside a Docker container available for everyone » 2019-02-08 09:22:33

1. If you mean using the officially compiled (using intel compilers) code_aster contained in the salome_meca package, there is already such Docker image quay.io/tianyikillua/salome_meca, where you can directly use the "as_run" command

2. If you mean using the GUI interface of salome_meca through Docker, there are lots of graphical issues (see for instance github.com/tianyikillua/code_aster_on_docker/issues/4, but also reported elsewhere) and there may be not a robust way to do this

#22 Re: Code_Aster usage » Temporary directory for MUMPS out-of-core » 2018-12-03 11:42:29

Oh yes the mumps temporary files are well placed in the rep_trav directory! I should have tried before asking :-)

#23 Code_Aster usage » Temporary directory for MUMPS out-of-core » 2018-12-03 11:08:59

tianyikillua
Replies: 1

Is it possible to define the temporary directory for an out-of-core usage of MUMPS? Can it be set via the "rep_trav" keyword in the export file?

I ask because there is some memory allocation issue using Docker for some very large models and it is appropriate to store all temporary working files in the shared drive (/home/aster/shared) (other than /tmp) to avoid memory issues.

#24 Re: Code_Aster usage » Modal analysis, strange results » 2018-10-31 16:40:25

1 N = 1 kg . m/s^2 = 1000 kg . mm/s^2 = 1 tonne . mm/s^2

So I >regret< to inform that the appropriate mass unit is tonne. So please try using RHO = 7.7E-9 tonne/mm^3

#25 Re: Code_Aster installation » Parallel install of CA 13.4.0 on Ubuntu 16.04 (Linux Mint 18.3) » 2018-09-18 11:26:22

Nice to know that it helps!!

Many compiling tricks can be found within the open-sourced Dockerfile

github.com/tianyikillua/code_aster_on_docker/blob/master/code_aster/Dockerfile

For the blacs problem, the trick is "cp libscalapack.so libblacs.so"

Some patch files are also useful

github.com/tianyikillua/code_aster_on_docker/blob/master/code_aster/data/patch_mumps

Cheeeers,

Tianyi