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

You are not logged in.

#1 2018-01-10 13:04:10

Fiala
Member
Registered: 2016-06-15
Posts: 5

[SOLVED] Aster Study manually edit .comm file

Is it possible directly in Aster Study edit .comm file before runing solver in this module?
For example I was not able in GUI add parameter "reuse", so I would like to write this parameter to code directly. Or if I need to add to .comm file some Python loops, I would also need edit it manually.

Last edited by Fiala (2018-01-11 13:47:24)

Offline

#2 2018-01-11 03:29:21

dbpatankar
Member
From: Roorkee, Uttarakhand, India
Registered: 2010-05-22
Posts: 143

Re: [SOLVED] Aster Study manually edit .comm file

Fiala wrote:

I was not able in GUI add parameter "reuse"

As far as I know, in AsterStudy, you need not add reuse. This will be added in the code if the name is same for 2 concepts provided they result into same type of concept. So just try using the same name without bothering about the 'reuse'.

Fiala wrote:

if I need to add to .comm file some Python loops, I would also need edit it manually.

In AsterStudy, right click on the stage (Stage 1, 2 etc) which you want to edit. Select 'Text Mode'. Now just double click the stage. You will be presented with the .comm file. Edit it as you like and save.

Last edited by dbpatankar (2018-01-11 03:34:31)

Offline

#3 2018-02-11 14:30:09

ypkalariya
Member
Registered: 2018-01-31
Posts: 3

Re: [SOLVED] Aster Study manually edit .comm file

I have the similar query regarding full analysis implementation through python script. Can anyone help me?
I have already installed Salome_meca.
I want to model and mesh in Salome. And then solve it in Code_aster and then postprocess in salome.
Thanks in advance for help.

Offline

#4 2018-02-11 21:12:35

dbpatankar
Member
From: Roorkee, Uttarakhand, India
Registered: 2010-05-22
Posts: 143

Re: [SOLVED] Aster Study manually edit .comm file

ypkalariya wrote:

I have the similar query regarding full analysis implementation through python script. Can anyone help me?
I have already installed Salome_meca.
I want to model and mesh in Salome. And then solve it in Code_aster and then postprocess in salome.
Thanks in advance for help.

CodeAster .comm file is a python script. So you can add your python code into the aster .comm file. There are some tutorials on the salome website for creating geometry and meshing using python script in salome. You can have a look there. Moreover, I also find the 'Dump study' option very helpful in many cases.

If you want to explore the python code behind the geometry and mesh, just create geometry and mesh it in Salome-Meca. Once meshing is done, use File > Dump study to export the python code behind the study.

Hope this helps.

Offline

#5 2018-02-12 11:18:38

ypkalariya
Member
Registered: 2018-01-31
Posts: 3

Re: [SOLVED] Aster Study manually edit .comm file

Yes, I am able to extract the python script from "Dump my study" and .comm files.
What I need is I want to run full python script in terminal without Salome GUI.
For that I think I need to set environment variables. I read a post which was very old and I am not able to find the files mention in the post.

Any guidance will be very helpful.

Offline

#6 2018-02-13 14:42:44

dbpatankar
Member
From: Roorkee, Uttarakhand, India
Registered: 2010-05-22
Posts: 143

Re: [SOLVED] Aster Study manually edit .comm file

ypkalariya wrote:

What I need is I want to run full python script in terminal without Salome GUI.
For that I think I need to set environment variables.

Have a look at the <salome-meca-installation/V2017.0.2/README file.

You can import the entire salome environment and create a shell using

./salome shell

Now in this shell you start your python and run the scripts you want.

If you want to use some IDE, then you just need to change the settings in IDE so that it can run this script before executing your script.

Hope this helps.

Offline

#7 2018-02-15 17:14:17

ypkalariya
Member
Registered: 2018-01-31
Posts: 3

Re: [SOLVED] Aster Study manually edit .comm file

dbpatankar wrote:

You can import the entire salome environment and create a shell using

./salome shell

I read the readme file. It was very helpful and now I am able to run full analysis in terminal.
Thank you very much.

Offline

Board footer