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

You are not logged in.

## #1 Re: Code_Aster usage » SOLVED : ressort spiral » Yesterday 15:26:03

Hi,

so it is solved? Could you please mark it as [SOLVED] (edit post title in first message)?

Thanks,

Mario.

## #2 Re: Code_Aster usage » SOLVED : ressort spiral » 2020-10-19 19:46:02

I made a small mistake in my last post, A was still at 0.62. For 180° it should be equal to 1.

Then the result is similar to the result calculated by Elmer, although it needs 1000 timesteps here,

Mario.

## #3 Re: Code_Aster usage » SOLVED : ressort spiral » 2020-10-19 16:32:28

Hi,

ok, I see. At first, I must say there is nothing obviously wrong with your calculation. It seems that your geometry is very sensitive to the choice of parameters in STAT_NON_LINE, so we are seeing some kind of numerical effect here. Your choice of 2nd order elements is obviously correct. Here is what I changed:
1.) increased the number of timesteps to 400. Anything lower, and there are timesteps where the spiral 'blows up'. I haven't seen anything like it before. It is very sensitive.
2.) In NEWTON I changed PREDICTION to ELASTIQUE. MATRICE = ELASTIQUE didn't work--> enormous RESI_GLOB_RELA--> ERROR.
3.) Set RESI_GLOB_RELA to 1E-6, although this is probably not important.

With these settings you'll get a similar result compared to Elmer (never used it, can't say anything about it). But I can't say which one of the results is 'better' per se,

Mario.

## #4 Re: Code_Aster usage » SOLVED : ressort spiral » 2020-10-16 21:59:11

Hi,

well, I'm not sure about that. The center of rotation is not in the center of the spring, whatever the 'center' is. If I estimate the center of mass of the spring without the holding thingy, there is for sure an offset between rotation center and center of mass. And also, the distances of the windings are different on either side,

Mario.

## #5 Re: Code_Aster usage » SOLVED : ressort spiral » 2020-10-16 14:32:43

Bonjour,

le calcul est plus réaliste si vous introduisez un DEFI_CONTACT entre les bords.

Mario.

## #6 Re: Code_Aster usage » 'as_run' (with mpi) vs 'mpiexec as_run' » 2020-10-16 14:09:23

Hi,

I do not know about the re-run issue but I can tell you what I set in the export file on my 2 machines to achieve a minimum of calculation time when running the MPI-version on one of these:

Machine 1 (2 CPUs à 8 cores):
P mpi_nbcpu 8
P mpi_nbnoeud 2
P ncpus 2

Machine 2 (4 CPUs à 12 cores):
P mpi_nbcpu 12
P mpi_nbnoeud 4
P ncpus 4

So, essentially mpi_ncpu = number_of_cores per CPU (this might not be the best on a single CPU system, there I would probably set number_of_cores/2). Please note that nothing else is running on these machines with these settings.

Mario.

## #7 Re: Code_Aster usage » 'as_run' (with mpi) vs 'mpiexec as_run' » 2020-10-16 07:49:39

Hello,

the only way I know to use MPI and CA is the following:

-) use the MPI version of CA and set it  up on your HPC machine and
-) as always, execute 'as_run the-export-file', with appropriate numbers for mpi_nbcpu, mpi_nbnoeud, ncpus (these numbers are specific to your system, you have to figure them out yourself).

mpirun -n N command

will only execute 'command' N times if it is not compiled with something the mpirun command does understand (e.g. with mpicc). The 'mpirun' command is executed INSIDE the call of as_run when using the parallel version of CA.

In case that is your next question: sorry, I do not know how to setup CA-parallel on a cluster. I have given up on building one, it is too much work that I understand too little of.

Mario.

EDIT: it is also advisable to use PARTITIONNEUR in AFFE_MODELE and MATR_DISTRIBUEE='OUI' in e.g. STAT_NON_LINE when using the parallel version.

## #8 Re: Salome-Meca installation » Need help with Installing Salome-Meca on Ubuntu 20-04 » 2020-10-10 08:51:41

Good morning,

thousands of people are using these files, so it is a pretty bold assumption to think the download file is faulty, don't you think? You are running it in a virtual machine? Are all your environment variables alright? Is your OS installation within the VM alright? Did you follow the installation instructions of Salome Meca 2019?

Please find attached a md5sum of the file I downloaded on 5th january 2020. I found it in my backup. It has the same md5 and it runs flawlessly ever since on 3 machines with Ubuntu 18.04 LTS,

Mario.

EDIT: I am, of course, not using SM within a VM because I like performance.

## #9 Re: Code_Aster usage » Plastic Deformation with C_Plan not working » 2020-10-01 08:17:22

Hello,

Sameer, it is not about the result itself in my last example, it is about what is IN the result (EPSP_...) of a simulation with plastic deformation. There is no EPSP_... if you use ELAS. I don't want to be rude but a displacement result of 1e-14mm is pointless, as it is smaller than the classical electron radius.

Mario.

## #10 Re: Code_Aster usage » Python code instead of mesh in astk » 2020-09-30 22:53:26

Hello Florian,

I have no experience with this, but I had an idea. Why don't you try to put all the python stuff into your .comm? Take a look at the file attached: I creates the standard 200³ cube and meshes it, also with standard parameters. This is, of course, extendable to other geometries and meshes etc.

Can't you put something like this in your .comm at the beginning (after DEBUT, of course)? I am pretty sure this should work,

Mario.

## #11 Re: Code_Aster usage » Plastic Deformation with C_Plan not working » 2020-09-30 21:23:57

Hello guys,

I dug out an old test case of mine and did some modifications. Unfortunately, there is no contact involved. It is not very elegant, but it shows plastic deformation with CA. The important thing is, all EPSP_.... are not equal to zero or near zero (we are dealing with numerical simulation here... ;-) so zero means roughly 1e-12 or 13 or 14, I don't know) after unloading also.

Florian, if you upload your zipped folder with the .hdf with geometry it would be easier for me to help you. I could play with the mesh etc.. It would take more time to redraw it, name groups etc...,

Mario.

## #12 Re: Code_Aster usage » [solved]Run same case on two computers, but one raises EXIT_CODE = 139 » 2020-09-30 21:08:53

Hi,

you're welcome, this is what this forum is about. Personally, I'd wish that more people would contribute. Every error we make gets us further,

Mario.

## #13 Re: Code_Aster usage » as_run in salome_meca directory could not be used by terminal » 2020-09-30 16:39:25

Hello,

weird coincidence! Try it like I just answered to chenghui62000 in the following post:

h ttps://code-aster.org/forum2/viewtopic.php?id=25212 (remove space after the 'h' not allowed to post links),

good luck,

Mario.

EDIT: this refers to starting it from the terminal....yes, you are correct, an additional installation of CA is NOT needed.

## #14 Re: Code_Aster usage » [solved]Run same case on two computers, but one raises EXIT_CODE = 139 » 2020-09-30 16:31:40

Hello,

I modified your run.sh and ran it. I must say, I do this with a well working installation of Salome Meca 2019.

I attach the output of CA. Essentially, it runs. So there might be something wrong with your installation. I had to interrupt with CTRL-C because your simulation cut the timestep and I didn't want to wait 'forever' so it shows ERROR=4 in the end (so in that sense it is not a true CA .mess file :-) ).

I call CA inside the SMECA installation with

/home/mario/salome_meca/appli_V2019.0.3_universal/salome shell -- as_run  the-export-file

if that helps.

I also attach the error.log you might want to compare it with yours (hint: 'meld' comes in handy for this in Ubuntu),

Mario.

EDIT: sorry, I just now looked at your output more carefully. BLAS is complaining in your output.

## #15 Re: Code_Aster usage » Plastic Deformation with C_Plan not working » 2020-09-30 12:43:13

Hi Sameer,

you are still using ELAS PETIT, so you do not get plastic behaviour (also: easier convergence). Your part jumps back to zero strain at t=20. However, there is some 'pico-DEPL' left in the part at t=20, possibly due to rounding errors. Scale factor in attached image is 1E6,

Mario.

## #16 Re: Code_Aster usage » Plastic Deformation with C_Plan not working » 2020-09-29 19:53:16

Hello,

you also have to define a COMPORTEMENT in STAT_NON_LINE. Defining the material parameters in a certain way does not define a material behaviour. See h ttps://www.code-aster.org/doc/default/en/man_u/u4/u4.51.11.pdf for details.

But I fear, there more to do to get your model to work:
-) the 'moving' part should be MAIT
-) but the MAIT should also have the coarser mesh than ESCL (your other part has only 4 nodes, as opposed to hundreds on the other). It is best to also use the 2 contact groups for meshing to influence the number/size of the elements in contact.
-) for mechanical ALWAYS use 2nd order elements (although it should work also without, but stress results will be off, with 1st order elements your model is stiffer. Especially in bending!)

See h ttps://www.code-aster.org/V2/doc/v15/en/man_u/u2/u2.04.04.pdf for the use of contact.

I tried with different behaviours (VMIS_ISOT_LINE, VMIS_CINE_LINE), but I did not get convergence, even after hundreds of iterations. I also tried a lot of other stuff (PENALISATION, etc.). I am not very familiar with C-PLAN elements, but that is what I can comment on your model,

Mario.

## #17 Re: Code_Aster usage » [SOLVED]Question about ELAS_FO » 2020-09-28 17:21:16

Hello,

I do not know about your error, but this should work with ELAS_FO. However, parameters for a RHO function can only be of type GEOM (X,Y,Z).

Mario.

## #18 Re: Code_Aster usage » Access to Material Characteriscs with Formule » 2020-09-28 16:42:42

Hello,

very good, this is a step in the right direction. I think you misunderstood me:

There is no need to mess around in the fieldmat, otherwise the task would be to figure out a new material model. And frankly, I have no idea how this is done. And it is not necessary if I understood your formulas correctly.

My proposition is the following:

1.) Extract the SIXX, etc.
3.) Create a result
4.) Visualize this result in ParaVis or do some other calculations on these results (I don't really no what this criterium is about...)

The material parameters are in fieldmat because you put them there :-). What I described is quite simple: define python variables with your material parameters, that you can use in your fieldmat AND your formulas. This is really no big deal you even could do without it but it would be harder to modify, please find attached modified .comm. I defined the first 3 parameters and used them in the fieldmat. You will then use them in your formulas too.

You are nearly there!

Mario.

EDIT: I'm sorry I had no time to do more...

## #19 Re: Code_Aster usage » [solved]Run same case on two computers, but one raises EXIT_CODE = 139 » 2020-09-28 08:55:46

Hello,

unfortunately, stderr isn't much more informative than the standard output of CA.

I am sorry, I do not know the reason for your error. It could be related to your installation (OS and or CA) or your hardware. In this case I would try a total reinstall (OS and CA). In fact it is somehow quite similar to this error (albeit MPI version of CA), I am working on again these days (no solution yet): h ttps://code-aster.org/forum2/viewtopic.php?id=25021

But the following I noticed in your files, it might not be related but:
you use ncpus = 10 on a 6-core CPU. From my experience, CA likes hyperthreading turned off and when using the sequential version of CA (or CA with SMECA) ncpus = number of cores/2. That would mean ncpus = 3 in your case. Don't know if it helps,

Mario.

EDIT: it is advisable to not use any fancy but poorly maintained Linux distros. Stick with the big ones, preferably with long support (Ubuntu LTS,....).

## #20 Re: Code_Aster usage » [solved]Run same case on two computers, but one raises EXIT_CODE = 139 » 2020-09-26 17:06:17

Hello,

the manual method in Linux should work too: when you launch your calculation you append '2> ~/error.log' to your as_run command. So it will look like this:

/opt/aster144/bin/as_run asterinput/ASTERRUN.EXPORT 2> ~/error.log

It reroutes the output of stderr into a file 'error.log' in your home directory.

This should work, of course you can write the file in whatever directory you want, it is not restricted to your home directory.

You can test this with whatever command will produce an error, for example a 'file not found' error:

ls xyz* 2> ~/error.log

then take a look at the file with

cat ~/error.log

Voila, the error is written to this file

Mario.

## #21 Re: Code_Aster usage » [SOLVED] Successful computation but no results using contact » 2020-09-25 12:25:57

..and here is the result with the deformation applied (see 7) above). It is scaled with a factor of 200 for visibility,

Mario.

## #22 Re: Code_Aster usage » [SOLVED] Successful computation but no results using contact » 2020-09-25 11:55:45

Hello,

it's all in the image posted previously.

1) Open your result file in ParaVis ('Open ParaView file' as ParaVis is an adapted version of 'ParaView')
2) Check the Data fields you want to visualize (here all 'ComSup0' are marked) in the Properties tab.
3) press APPLY below
4) jump to timestep t=1 (above in the middle on my screen)
5) Choose the DEPLs to visualize

Then you'll get the image above.

If you want to visualize the deformation additionally (not only the fields projected on the undeformed bodies):

6) Check 'GenerateVectors' and APPLY (it's done in the image but I did not do the following step, obviously I forgot)
7) In Filters ---> Common --> Warp By Vector --> APPLY

Then you'll see the deformed bodies.

Please mark as [SOLVED], thank you.

Mario.

## #23 Re: Code_Aster usage » [SOLVED] Successful computation but no results using contact » 2020-09-24 18:21:56

Hi,

what seems to be the problem? I just ran your files, and I can see a displacement (see attached image). I mean, I did not check if the results make sense, but, clearly, your calculation works!

Maybe you did not look at t=1 in ParaVis?

Mario.

## #24 Re: Code_Aster usage » PROL_ZERO not found in CREA_CHAMP » 2020-09-24 11:38:50

Hello,

for example: PROL_ZERO is not applicable for all TYPE_CHAM. If you take a look in Asterstudy, it is only available for the TYPE_CHAM named

ELEM_.....
ELGA_.....
ELNO_.....

but not for

CART_.... and
NOEU_......

Maybe you address a CART_.... or NOEU_.... ? Difficult to tell without the .comm,

Mario.

## #25 Re: Code_Aster usage » Access to Material Characteriscs with Formule » 2020-09-23 13:52:08

Hello,

I think I understand what you want to calculate. However, there is a lot to do.....

Let me say, what catched my eyes in the first place:
I think you cannot use the material parameters defined in DEFI_MATERIAU (XT etc..) directly like you did with your formulas (anybody correct me please if I am wrong...). I would define python variables for this. Similar to this, as you have two materials:

Rov_E_L, Rov_E_N, Rov_E_T,...Mat_E_L, ,.... Mat_YT.... I think you get the point.

You define them in the beginning, thus you can reuse the anywhere in your .comm (in your DEFI_MATERIAU and your FORMULES, there's alot of them ... :-( )

Doing it like this, you will have to define two FORMULES one for each material.

As far as I understood, you'll need the SIXX, SIYY, SIZZ, SIXY, SIXY, SIYZ components of your result and your material constants to evaluate your criterion (which I did not know about until now..). Therefore you'll have to do something like this because these components are in SIEF_NOEU (also for the SUP results!):

reslin = CALC_CHAMP(
CONTRAINTE=('SIEF_ELNO', ),
RESULTAT=reslin
)

SIEL_inf = POST_CHAMP(
EXTR_COQUE=_F(
NIVE_COUCHE='INF',
NOM_CHAM=('SIEF_ELGA', ),
NUME_COUCHE=1
),
RESULTAT=reslin
)

SINO_inf = CALC_CHAMP(
CONTRAINTE=('SIEF_NOEU', ),
RESULTAT=SIEL_inf
)