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

You are not logged in.

#1 Code_Aster usage » There are not a file glob.1 or bhdf.1 in the current directory » 2021-03-26 10:32:40

lskrinjar
Replies: 1

I am trying to run the calculation and I have managed to automate the geometry and meshing - Load script in Salome_meca (sigma_2D_geometry_0.py) and then in Code_aster I add stage from file (static_analysis_2D_linear_q02.comm) and run the study but I receive the following error:

   !-----------------------------------------------------------------------!
   ! <F> <SUPERVIS_89>                                                     !
   !                                                                       !
   !  There are not a file glob.1 or bhdf.1 in the current directory.      !
   !                                                                       !
   ! Advices:                                                              !
   !  - Check that you have a base (of type bases or bhdf) in your study.  !
   !  - Check if it must be decompressed or not.                           !
   !                                                                       !
   !                                                                       !
   ! This error is fatal. The code stops.                                  !
   !-----------------------------------------------------------------------!

Can anyone give some advice where the error is?

#2 Re: Salome-Meca usage » YACS usage ? » 2021-01-24 21:14:16

To make this old post active again. I am also interested in the YACS module (docs.salome-platform.org/5/yacs/user/dataflow.html), I would appriciate any information especially with examples. At the moment I am looking to use the node "switch" but cannot find information how to use it.

#3 Re: Salome-Meca installation » [SOLVED] Install new package in salome_meca python distribution » 2021-01-07 20:59:42

Irvise wrote:

Hi Iskrinjar,

I am glad that got fixed. This is an important solution, so if you could please change the topic to "[SOLVED] Install new ..." that will help others find it.

Also, answering your question. Yes, salome_prerequisites.sh runs when salome boots.

Regards,

Fer

Done - status [Solved] added, as suggested. Probably I should add the target location so the command should be someting like this at the end:
pip3 install pandas --target=/home/lskrinjar/salome_meca/V2019.0.3_universal/prerequisites/Pandas-115

and with this the package should be installed in the specified directory - I will try this sometime in the future on another VM and give the update.

Thank you once again also for the comment on the .sh file.

Best,
Luka

#5 Re: Salome-Meca installation » [SOLVED] Install new package in salome_meca python distribution » 2021-01-06 21:26:07

Irvise wrote:

Hi,

I think I found the solution(s). The problem is PYTHONPATH. That variable holds the directories where python will look for packages. Salome sets its own PYTHONPATH. So, here are the options:

Add pandas to salome's environment. For this, you would have to modify the file "V2019.0.3_universal/salome_prerequisites.sh". If you take a look at another python module, it will be obvious how to do it. Since you installed pandas already under the prerequisites folder, this may be the best way to go.

The alternative is to add your system path to salome's environment. I do not know if this is a good idea, since python versions may differ (if you have issues, maybe a virtual_env will help). To do this, I would recommend that you take a look at this two links, it is pretty simple.

stackoverflow.com/questions/247770/how-to-retrieve-a-modules-path
xmodulo.com/change-syspath-pythonpath-python.html

Regards,

Fer

Hello Fernando,

regarding your first solution I have installed pandas package in the following steps:
./salome shell
sudo -H python3.6 -m pip install pandas --target=/home/lskrinjar/salome_meca/V2019.0.3_universal/prerequisites/Pandas-115

and this installed the following packages in this folder: numpy-1.19.5 pandas-1.1.5 python-dateutil-2.8.1 pytz-2020.5 six-1.15.0
(not sure if this is OK, because the structure in this folder Pandas-115 is not similar as the one of /prerequisites/Numpy-1151 as you suggested. And I cannot find in any of the subfolders /Pandas-115/ the folder /lib/ to add the line in file salome_prerequisites.sh as you suggested:
export PYTHONPATH="${PREREQUISITES_ROOT_DIR}/Pandas-115/lib/python3.6/site-packages":${PYTHONPATH}

I than run:
pip3 install pandas
And initially it raised an error (although looking good):
FileNotFoundError: [Errno 2] No such file or directory: '/home/lskrinjar/salome_meca/V2019.0.3_universal/prerequisites/Matplotlib-222/pytz-2015.2-py3.6.egg'

And tried one more time the last command and it returned:
Requirement already satisfied: pandas in /home/lskrinjar/salome_meca/V2019.0.3_universal/prerequisites/Python-365/lib/python3.6/site-packages (1.1.5)
Requirement already satisfied: pytz>=2017.2 in /home/lskrinjar/salome_meca/V2019.0.3_universal/prerequisites/Python-365/lib/python3.6/site-packages (from pandas) (2020.5)
Requirement already satisfied: numpy>=1.15.4 in /home/lskrinjar/salome_meca/V2019.0.3_universal/prerequisites/Python-365/lib/python3.6/site-packages (from pandas) (1.19.5)
Requirement already satisfied: python-dateutil>=2.7.3 in /home/lskrinjar/salome_meca/V2019.0.3_universal/prerequisites/Python-365/lib/python3.6/site-packages (from pandas) (2.8.1)
Requirement already satisfied: six>=1.5 in /home/lskrinjar/salome_meca/V2019.0.3_universal/prerequisites/Matplotlib-222/six-1.12.0-py3.6.egg (from python-dateutil>=2.7.3->pandas) (1.12.0)

This looks OK to me. If I manage to install it correctly should I run the file salome_prerequisites.sh or is this done automatically each time at salome_meca startup?

Once again thank you very much for your kind help and usefull informations.
Best,
Luka

#6 Re: Salome-Meca installation » [SOLVED] Install new package in salome_meca python distribution » 2021-01-06 19:14:58

Irvise wrote:

Hi Iskrinjar,

I understand your problem better now. I suppose that you are writing a Python script within YACS that makes use of Pandas, is that right?

And that is indeed quite strange. Salome should export all of its requirements when booting, so that they should be available when needed. That, of course, includes YACS...

I am going to test it and I will report back.

Regards,

Fer

Hi Irvise,
yes, you are correct. I am trying to do something similar to the code on the link 'github.com/core-engineering/aster-calc-beam'. In YACS I am using an Inline Script Node in this Node I insert a python code and would like to import pandas package. But I cannot install it correclty to be found within salome_meca python distribution (OS Ubuntu 18.04.5 LTS). Your help is kindly appreciated, as I am running out of ideas. I will try your suggestion as suggested below and report it back.

Kind regards,
Luka

#7 Re: Salome-Meca installation » [SOLVED] Install new package in salome_meca python distribution » 2021-01-04 17:42:06

Irvise wrote:

Hello Iskrinjar,

I am not very well versed with how the Python module system works. However, a lot of the problems regarding Python in salome are due to the environment variables not being set correctly.

Take a look at these two other posts, maybe they will help you. At least one of them will make the Python environment of salome available to your computer.

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

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

Regards,

Fernando Oleo Blanco

Hello Fernando,
thank you for the suggestions. I have checked the links you suggested... the first link (code-aster.org/forum2/viewtopic.php?id=25323) is actually the exact oposite of what I would like. The second link (code-aster.org/forum2/viewtopic.php?id=25234) is similar up to the point when the command is executed:
$ source ./V2019.0.3_universal/salome_prerequisites.sh

unfortunately with the command: sudo -H python3.6 -m pip install pandas --target=/home/lskrinjar/salome_meca/V2019.0.3_universal/prerequisites/Pandas-120 I have managed to install the package to the requested directory, but in this folder it also installed other packages (numpy-1.19.4 pandas-1.1.5 python-dateutil-2.8.1 pytz-2020.5 six-1.15.0
).

I ran the YACS script once again the problem is not solved.

#8 Salome-Meca installation » [SOLVED] Install new package in salome_meca python distribution » 2021-01-02 16:32:46

lskrinjar
Replies: 9

I am trying to install the package (pandas) with the command:

sudo python3.6 -m pip install --install-option="--prefix=/home/username/salome_meca/V2019.0.3_universal/prerequisites/Pandas-120" pandas

It raises an error: Requirement already satisfied: pandas in /usr/lib/python3/dist-packages

And I cannot import this module as the python (3.6.5) distribution in Salome_meca cannot find it, when I run the code in the Salome_meca invornment.

#9 Code_Aster usage » MACR_CARA_POUTRE for hollow symmetrical sections? » 2020-12-27 16:13:33

lskrinjar
Replies: 0

If I understand it correctly you cannot use MACR_CARA_POUTRE when modeling a 1- or 2-times symmetrical hollow section to calculate properties of a section (ie. hollow rectangular/square tube - modeling only half or 1 quarter of a section). If this is correct, this restriction should be written in the documentation ("code-aster.org/V2/doc/v11/en/man_u/u4/u4.42.02.pdf").

#10 Code_Aster usage » IMPR_TABLE writes double data to file » 2020-12-27 15:12:03

lskrinjar
Replies: 0

I am using MACR_CARA_POUTRE to calculate beam properties and then write the table to file with IMPR_TABLE but the table is written in the file two times (the .comm file is attached). Any ideas why?

Below is the output written in the file:
#
#--------------------------------------------------------------------------------
##ASTER 14.4.0 CONCEPT sec_data CALCULE LE 12/27/2020 A 14:36:52 DE TYPE         
LIEU                     A            IY           IZ           AY           AZ           EY           EZ           JX           IYR2         IZR2         RY           RZ           RT           ALPHA        CDG_Y        CDG_Z       
Profile_elements          8.50000E+02  7.14030E+04  2.62157E+05  1.95719E+00  1.96301E+00 -3.02556E+00 -1.35231E+01 -5.03540E-13 -1.75932E+06 -4.31889E+05  3.49511E+01  2.15721E+01  1.22898E-15 -3.81292E+01  3.32353E+01  3.07353E+01

#
#--------------------------------------------------------------------------------
##ASTER 14.4.0 CONCEPT sec_data CALCULE LE 12/27/2020 A 14:36:52 DE TYPE         
LIEU                     A            IY           IZ           AY           AZ           EY           EZ           JX           IYR2         IZR2         RY           RZ           RT           ALPHA        CDG_Y        CDG_Z       
Profile_elements          8.50000E+02  7.14030E+04  2.62157E+05  1.95719E+00  1.96301E+00 -3.02556E+00 -1.35231E+01 -5.03540E-13 -1.75932E+06 -4.31889E+05  3.49511E+01  2.15721E+01  1.22898E-15 -3.81292E+01  3.32353E+01  3.07353E+01

#11 Re: Salome-Meca usage » Using geompy.CreateGroup() while IDs are not constant » 2020-11-13 17:52:42

Thank you all for the help and suggestions. I have managed to solve the problem somehow.... the solution is in the attached file.

#12 Salome-Meca usage » Using geompy.CreateGroup() while IDs are not constant » 2020-11-01 09:32:52

lskrinjar
Replies: 3

Hello everyone,

I am trying to create a parametric 2D geometry model of a simple frame. As I would like to have parameters for total length and the number of sections I do not know how to create groups with command geompy.CreateGroup() as the indexes vary with the parameters length and number of sections.
I would like to create the following groups: vertical_lines, diagonal_lines, outer_frame - this groups should be a child of a frame partition. Any suggestions?

Or should I create this groups in mesh module as I need this for meshing?

#13 Code_Aster usage » Visualizaton differences between DEPL and VMIS using DKT elements » 2020-05-01 10:24:52

lskrinjar
Replies: 0

I have solved the linear static analysis of steel beam profile using DKT elements. First I solve the displacement field (reslin__DEPL, file: static_analysis.comm) and then perform postprocessing of results (reslin) to evaluate von mises stress field (res_1__SIEQ_ELNO_VMIS, file: postprocess_von_mises.comm), see file: depl_and_vmis.png. The visualization of the von mises stress field does not look smooth/continuous. What could be the problem?

The file can be downloaded from url (due to size limit): #https://www.dropbox.com/s/6n96fgvc1m1gm8r/profile_V0_analysis.zip?dl=0#

#14 Code_Aster usage » Visualizaton differences between DEPL and VMIS using DKT elements » 2020-05-01 10:20:30

lskrinjar
Replies: 2

I have solved the linear static analysis of steel beam profile using DKT elements. First I solve the displacement field (reslin__DEPL, file: static_analysis.comm) and then perform postprocessing of results (reslin) to evaluate von mises stress field (res_1__SIEQ_ELNO_VMIS, file: postprocess_von_mises.comm), see file: depl_and_vmis.png. The visualization of the von mises stress field does not look smooth/continuous. What could be the problem?

#15 Introduce yourself / Présentez vous » Hello from Slovenia » 2020-05-01 10:03:22

lskrinjar
Replies: 0

I am a mechanical engineer and planning to use the software mainly for linear and nonlinear static analysis of steel (rack) structures and probably for dynamic analysis as well.

#16 Re: Code_Aster usage » [Solved] ANGL_REP ou VECTEUR. error ? » 2020-04-23 07:21:30

jeanpierreaubry wrote:
lskrinjar wrote:

can a VECTEUR has values (1, 1, 1) for all elements? - This would be logical for me.

of course i can
but be carefull this may not be the solution il ALL cases

@ jeanpierreaubry
Thank you for your help. Just one last question at this topic: can you give me some general/special examples when this cannot be used in ALL cases just to get better understanding of the right usage?

#17 Re: Code_Aster usage » [Solved] ANGL_REP ou VECTEUR. error ? » 2020-04-22 06:58:28

Thank you for your help and usefull imformation. I have set VECTEUR values for this case:
(1, 1, 0) - for horizontal elements and (0, 1, 1) - for vertical elements and the problem is solved successfully. One question I have is in case of multiple orientations of shell elements - can a VECTEUR has values (1, 1, 1) for all elements? - This would be logical for me.

#19 Re: Code_Aster usage » [Solved] ANGL_REP ou VECTEUR. error ? » 2020-04-20 18:32:42

Hello jeanpierreaubry,

thank you for quick reply. I have attached the files:
- .hdf
- .bmp - orientation of the elements/normals
- .med - mesh object file

#20 Re: Code_Aster usage » [Solved] ANGL_REP ou VECTEUR. error ? » 2020-04-20 14:24:14

I am having similar problem as I am trying to implement the orientation vector as suggested by jeanpierreaubry with function AFFE_CARA_ELEM.  I've attached the .mess file and would kindly ask you for your advice - what is the problem.

#22 Salome-Meca usage » How to model a surface load (pressure) on structure of beam elements » 2020-03-31 20:05:14

lskrinjar
Replies: 1

I have managed to create a geometry of a steel structure made of profiles - modeled/meshed with beam elements. Now I have to apply (service) load to the steel structure frame that is defined as area (surface) load - pressure (kg/m²). I have created geometry of lines (beams) and top surface area (shell).

I would like to use quadrilateral mesh for the top surface - rectangle. This I have created (Option 1), but then I had 4 mesh objects in Mesh module:
Mesh_1 (HEA200 profiles)
Mesh_2 (HEA140 profiles)
Mesh_3 (square tube 100x100x5 profiles)
Mesh_4 (quadrilateral mesh of top surface)

I did not proceed with this as I do not know how to import 4 meshes in code_aster and mainly I would like to ask you if it is possible to connect the displacements of beam elements with displacements of shell elements - as the nodes do not coincide! What is here the best practice or the most robust option?

Option 2:
Then I created only one mesh object - Mesh_1 (see attached figure) but with this the top surface area was mashed (based on nodes of beam elements) with triangular elements. With only one mesh object (from Partition) also did not have as much options for creating groups (also from geometry) as in Option 1.

I would like to ask you what is here the common practice for modeling this type of mechanical problems?

#23 Re: Code_Aster usage » DOF associated with node N3 and the component DRX » 2020-03-25 16:04:21

hberro wrote:

Dear lskrinjar,

Nothing seems wrong with your virtual machine / GL libraries.

Are you using windows as your host machine ?

If yes, I have noticed that you might need to deactivate the firewall (in Windows Security) for the current network. Otherwise, the salome and paraview servers can fail.

Let us know if that helps...

HB

Dear hberro,

thanks for the help and suggestions.  I am using windows as host. I think I have solved the problem. The problem was when I exported the mesh to .med file in MESH module and in code_aster I pointed to read the mesh from .med file and not from current mesh object. After the successful computation I tried to show the results in paravis and it raised this error. I tested in on another new "project" without reading the mesh from file but with reading the Mesh_1 object - with this approach I could show the results in paravis without errors. I also opened the same .hdf file (with already computed results) on another virtual machine and it showed the results in paravis also without problems. Maybe the problem was with reading the .med mesh file.
If you agree I would suggest to mark this thread as solved. - How can this be done?

Thanks once again for all your efforts and suggestions, as I am quite new to this software.But slowly the progress is being made.

#24 Re: Code_Aster usage » DOF associated with node N3 and the component DRX » 2020-03-24 15:22:44

@jeanpierreaubry
thank you for the review of the results. Probably I have misinterpreted the visualization of results, you are right. Thank you for pointing me that out. I am interested in static analysis results, but probably I used the wrong function, as I am really new user of the salome_meca. The modal analysis is the next step in the future. First I have to fix the ""SIGSEGV 'segmentation violation' detected" when trying to visualize the results in paravis.

Thank you for your help and all the best.

#25 Re: Code_Aster usage » DOF associated with node N3 and the component DRX » 2020-03-24 09:36:54

jeanpierreaubry wrote:

what i want is the mesh not the comm file which i already have from a previous post

if you have length in mm and force in N then you need to set mass density in t/mm3
this is written in all good textbooks or in my book in chapter 6.1
or i can be checked with a very simple dimensional calculation
this was just an educational remark as this parameter is not used in your case

as the element formulation is exact a convergence mesh check is a waste of time
but if you want to do it

I do apologize for my misunderstanding. Thank you for point out this inconsistency with the units for density. I have to take a look at your book.
I have attached the mesh file.