Is it possible to record the pressure on the walls?

Questions and remarks about Code_Saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
MartianDuan
Posts: 74
Joined: Fri Aug 02, 2013 4:26 pm

Is it possible to record the pressure on the walls?

Post by MartianDuan » Fri Oct 23, 2015 4:06 pm

Hello developers and users,

I am using the Code_Saturne to monitoring the fluids structure interaction. The plan is using the code_saturne to obtain the pressure field on the boundary and apply it in the code_aster.

I know that we can easily export the yplus and tplus on the wall in code_saturne 4.0.*. However, I did not find a way to save the pressure results.

If you have any clues on this topic. Can you please share them with me?

Thanks very much,

Yu.

Martin FERRAND
Posts: 37
Joined: Wed Mar 14, 2012 10:06 am

Re: Is it possible to record the pressure on the walls?

Post by Martin FERRAND » Fri Oct 23, 2015 7:58 pm

Hello,
You can export the stress of the fluid on the structure directly in the GUI. The normal component is therefore the pressure (more or less).
By the way, The coupling between Code_Saturne and aster is already working in version 4.0.3.
Best regards
Martin

MartianDuan
Posts: 74
Joined: Fri Aug 02, 2013 4:26 pm

Re: Is it possible to record the pressure on the walls?

Post by MartianDuan » Mon Oct 26, 2015 10:12 am

Hi Martin,

Thanks for your reply.

Unfortunately, I am using the subrountine to setup the case. As I can not install the GUI sucessfully. Can you please let me know how to do it via subrountines?

Furthermore, it is realy great to know that the coupling is working now. I will try later on.

Thanks very much.

Yu.
Martin FERRAND wrote:Hello,
You can export the stress of the fluid on the structure directly in the GUI. The normal component is therefore the pressure (more or less).
By the way, The coupling between Code_Saturne and aster is already working in version 4.0.3.
Best regards
Martin

MartianDuan
Posts: 74
Joined: Fri Aug 02, 2013 4:26 pm

Re: Is it possible to record the pressure on the walls?

Post by MartianDuan » Mon Oct 26, 2015 10:47 am

Hi Martin,

Do you have any guidence for the coupling between Code_Saturne and Aster. If so, can you please share it with me?

Thanks in advance,

Yu.
Martin FERRAND wrote:Hello,
You can export the stress of the fluid on the structure directly in the GUI. The normal component is therefore the pressure (more or less).
By the way, The coupling between Code_Saturne and aster is already working in version 4.0.3.
Best regards
Martin

Yvan Fournier
Posts: 2823
Joined: Mon Feb 20, 2012 3:25 pm

Re: Is it possible to record the pressure on the walls?

Post by Yvan Fournier » Mon Oct 26, 2015 5:30 pm

Hello,

Do you expect to need coupling (2-way), or simply Code_Saturne output -> Code_Aster boundary condition ?

For true (2-way) coupling, yo actually need a patch which will be in version 4.0.4 (and is already on the repository).

For simple "chaining", I recommend defining an additional output writer in MED format (under the GUI, "calculation control/output"), and associate the boundary mesh to that, with "automatic" variables checked, so that all variables normally output on the boundary will also be on that mesh (using user subroutines, such as cs_user_postprocess_var.f90, it is possible to do a "cleaner" output with just the pressure or strains, so if you are comfortable with user subroutines, it is an even better, though a bit more advanced solution).

Code_Aster is able to read MED format files, but I don't know the details from then on...

Regards,

Yvan

MartianDuan
Posts: 74
Joined: Fri Aug 02, 2013 4:26 pm

Re: Is it possible to record the pressure on the walls?

Post by MartianDuan » Tue Oct 27, 2015 1:07 pm

Hello Yvan,

Thanks for your reply. It is greate that the code_saturne and code_aster can be coupled in the new releasing.

To make the function work, what else do I need to do? Do I need to compile the code_saturne with code_aster(Salome-Meca)?

Kindest regards,

Yu.
Yvan Fournier wrote:Hello,

Do you expect to need coupling (2-way), or simply Code_Saturne output -> Code_Aster boundary condition ?

For true (2-way) coupling, yo actually need a patch which will be in version 4.0.4 (and is already on the repository).

For simple "chaining", I recommend defining an additional output writer in MED format (under the GUI, "calculation control/output"), and associate the boundary mesh to that, with "automatic" variables checked, so that all variables normally output on the boundary will also be on that mesh (using user subroutines, such as cs_user_postprocess_var.f90, it is possible to do a "cleaner" output with just the pressure or strains, so if you are comfortable with user subroutines, it is an even better, though a bit more advanced solution).

Code_Aster is able to read MED format files, but I don't know the details from then on...

Regards,

Yvan

Yvan Fournier
Posts: 2823
Joined: Mon Feb 20, 2012 3:25 pm

Re: Is it possible to record the pressure on the walls?

Post by Yvan Fournier » Wed Oct 28, 2015 2:03 am

Hello,

For 2-way coupling, you need to install Code_Saturne with SALOME support (using the --with-salome= configure option). As Code_Aster is available in SALOME_MECA, using the SALOME_MECA variant of SALOME is a good solution here.

You still need patches in the 4.0 branch of the code (that will be in 4.0.4, not yet released), and 2 patches in Code_Aster (which I could send you).

The documentation is minimal (or not existing yet) at this stage, though I could post an example from a test case.

Otherwise, as I explained in a previous post, if one-way coupling is enough, a MED file outpur with surface pressure is enough.

Regards,

Yvan

MartianDuan
Posts: 74
Joined: Fri Aug 02, 2013 4:26 pm

Re: Is it possible to record the pressure on the walls?

Post by MartianDuan » Wed Oct 28, 2015 9:32 am

Hello Yvan,

The final stage of my plan is eventually to using the two-way coupling. As a result, I am sure that I need the extra patches you mentioned. Thanks for your kindness, it will be quite helpful, if I can have them.

I have some questions regarding coupling of code_saturne and SALOME_MECA. I belived that the installation of SALOME_MECA is quite simple as it contains all of the third party libraries in the installation. I just wonder, if my version of my installtion is different from the version used in SALOME_MECA, would it affect the compiling of code_saturne and salome_meca?

In addition, is it necessary to install the GUI of code_saturne to use the two couple. Finally, Can I using parallel computing if I am using two-way coupling?

Thanks again.

Regards,

Yu.

Yvan Fournier wrote:Hello,

For 2-way coupling, you need to install Code_Saturne with SALOME support (using the --with-salome= configure option). As Code_Aster is available in SALOME_MECA, using the SALOME_MECA variant of SALOME is a good solution here.

You still need patches in the 4.0 branch of the code (that will be in 4.0.4, not yet released), and 2 patches in Code_Aster (which I could send you).

The documentation is minimal (or not existing yet) at this stage, though I could post an example from a test case.

Otherwise, as I explained in a previous post, if one-way coupling is enough, a MED file outpur with surface pressure is enough.

Regards,

Yvan

Yvan Fournier
Posts: 2823
Joined: Mon Feb 20, 2012 3:25 pm

Re: Is it possible to record the pressure on the walls?

Post by Yvan Fournier » Thu Oct 29, 2015 11:09 am

Hello,

Most recent versions of SALOME_MECA and Code_Saturne should be compatible.

Install SALOME_MECA first, than Code_Saturne using --with-salome= for that version.

For Code_Saturne, if you use 4.0.3, you'll need to patch it with the version of src/base/cs_ast_coupling.c that you can find on the SVN mirror: http://code-saturne.org/viewvc/saturne/ ... /src/base/.

To create a coupled case, simply use "code_saturne create -s <study_name> -c <code_saturne_domain_case_name> --aster=<aster_domain_case_name>".
The setup each code... (For Code_Saturne, familiarizing yourself with ALE first is a good idea)

For Code_Aster, people who debugged the coupling recommended the following:
in bibfor/prepost: coeneu.F90 and coeelt.F90 : formats must be modified (see attached files)
in bibpyt/Macro: calc_ifs_dnl_ops.py : remove # (coment) before ETAT_INIT=... (see attached file).

I can't help you with the Code_Aster side, so support for this will be limited...

Parallelism should work in theory, but has not been tested yet to my knowledge, so be prepared to iterate with me for possible debugging... Also, with batch systems, as both codes are launched through SALOME, but each has its own MPI execution, I'm not too sure how the load distribution will go (we have not worked on this issue yet, and I don't thing the SALOME team has either).

The attached cs_user_fluid_interaction.f90 is an example for the Code_Saturne side.

Regards,

Yvan
Attachments
cs_user_fluid_structure_interaction.f90
(4.35 KiB) Downloaded 72 times
coeneu.F90
(3.99 KiB) Downloaded 60 times
coeelt.F90
(6.74 KiB) Downloaded 61 times
calc_ifs_dnl_ops.py
(23.14 KiB) Downloaded 71 times

Post Reply