Page 1 of 1

HOW can i do to run code_saturne on YACS

Posted: Tue Oct 05, 2021 4:23 am
by Yvonne
Hello all!

Recently I study how to use the salome_yacs to run code_saturne.

I used the dump scripts to run, I find that the dump scripts maybe overwrite my settings and the GUI seems to become initialized.

but it was not my original intention. is it feasible to run cide_saturne on YACS? if it can work, can you tell me how to do that? thank you so so so much!

best wish!

Re: HOW can i do to run code_saturne on YACS

Posted: Tue Oct 05, 2021 5:53 pm
by Yvan Fournier
Hello,

This is a very broad question, so I do not know where to start.

I am not sure what you call the dump scripts.

When running code_saturne under OpenTURNS (par sensitivity analysis), I think YACS is used indirectly.
We also had an coupling mode with code_aster, where we used low-level features (CALCIUM library compatibility) which also used YACS, but this low-lvel interface has been removed.

At a high level, using Python scripts, yes, you can use YACS, but how you use it depends on what you need to do.
Using a finer integration (with YACS input/output ports) is not really handled, or you would need to manage all input/output ports as part of your scripts.

Also, if you want to run in parallel, I do not think the basic YACS features handled batch systems, though the associated YDEFX module does. Unfortunately, I do not have any code examples, so if other people on this forum do, they are welcome to share them.

Best regards,

Yvan

Re: HOW can i do to run code_saturne on YACS

Posted: Sun Oct 17, 2021 2:33 pm
by Yvonne
Dear Yvan,
Thank you for your answer!
Sorry that I don't explain what dump scripts are. Here I attached the screenshot.

When I run the dump scripts in YACS, I find that the setting is overwritten.
Maybe it is wrong to link the code_saturne by dump scripts? :?

so how can I do or write what scripts that i can link the YACS and code_saturne, just like link the code_aster and YACS.
Many thanks

Best wish

Yvonne

Re: HOW can i do to run code_saturne on YACS

Posted: Tue Oct 19, 2021 12:14 pm
by Yvan Fournier
Hello,

The utility of "dump scripts" is limited. These scripts allow modification of a case's XML setup, so they may be useful in the following workflow:

- set up a computation case.
- dump the Python script
- adapt commands from this script in cs_user_scripts.py or an external script called by studymanager for a parametric study.

None of that requires YACS. Using YACS, you could also set up a parametric study loop, but there are no current examples to my knowledge. I am not familiar with code_aster YACS scripts, so I cannot compare them..

In any case, the scripts that are dumped by the GUI only manage the xml values. They do not handle the full computation, so need to be included in some other script.

Best regards,

Yvan

Re: HOW can i do to run code_saturne on YACS

Posted: Tue Oct 19, 2021 2:53 pm
by Yvonne
Dear Yvan

Thank you for your reply! it's helpful for me

Best wish

Re: HOW can i do to run code_saturne on YACS

Posted: Sun Oct 31, 2021 3:01 am
by Yvonne
Dear Yvan
recently I want to run the code_saturne in yacs, but I have tried most times that failed. (whatever in Salome or the Salome-CFD). The screenshot has attached.

I don't know if my code has wrong?
can you help me? (i just want to run the code_saturne in yacs)


here is my code:
import os
from subprocess import check_output

case_path = '/home/wfy/20210823.cas/CASE1'
xml_path = os.path.join(case_path, 'DATA/setup.xml')
os.chdir(case_path)
out = check_output(['code_saturne', 'run', '--param', xml_path).decode()

Re: HOW can i do to run code_saturne on YACS

Posted: Mon Nov 01, 2021 9:59 pm
by Yvan Fournier
Hello,

As a general rule, whenever you have an error message indicating a given process has failed, try to check if you have error messages matching the process in question. For code_saturne, that would be the usual error* messages in the RESU/<run_id> run directory, or if you find nothing useful there, in more detailed logs from YACS.

Without more detailed error messages, I can't help. With code_saturne alone, I could help you increase logging, but I am not familiar enough with YACS to indicate how to troubleshoot an error under YACS. You might find additional help on the salome-platform.org forum.

Best regards,

Yvan

Re: HOW can i do to run code_saturne on YACS

Posted: Tue Nov 02, 2021 8:00 am
by Yvonne
thank you very much~~