Search found 234 matches

by Luciano Garelli
Thu Mar 19, 2020 2:03 pm
Forum: Code_Saturne usage
Topic: ibeta
Replies: 2
Views: 59

Re: ibeta

Hello, ibeta it is a (integer) pointer for thermal expansion coefficient. To access to the thermal expansion coeff you can use this example used inphyvar.f90, I think. double precision, dimension(:), pointer :: cpro_beta .... .... if (ibeta.ge.0) then iok1 = 0 call field_get_val_s(ibeta, cpro_beta) ...
by Luciano Garelli
Tue Mar 17, 2020 3:01 pm
Forum: Code_Saturne usage
Topic: thermal expansion coefficient
Replies: 4
Views: 82

Re: thermal expansion coefficient

Hello, In the file /turb/divrit.f90 are the same lines that you mention, ! AFM model ! "-C_theta*k/eps*( xi* uT'.Grad u + eta*beta*g_i*T'^2)" if (iturt(iscal).eq.20) then if (itt.gt.0.and.ibeta.ge.0) then temp(ii) = temp(ii) - ctheta(iscal)*xtt* & etaafm*cpro_beta(iel)*grav(ii)*cvara_tt(iel) endif S...
by Luciano Garelli
Tue Mar 17, 2020 1:46 pm
Forum: Code_Saturne usage
Topic: Breaking the GUI
Replies: 3
Views: 61

Re: Breaking the GUI

Hello,

I download your xml and can't reproduce you error. I make some changes and save it without any error or warning.

What version of CS are you using?

Regards,
Luciano
by Luciano Garelli
Tue Mar 17, 2020 1:33 pm
Forum: Code_Saturne usage
Topic: thermal expansion coefficient
Replies: 4
Views: 82

Re: thermal expansion coefficient

Hello, First of all you have to activate the thermal model, then in the fluid property tab change density from constant to user law. In the mathematical expression editor you can write an equation for the density which include the thermal expansion coefficient, like the Boussinesq approximation for ...
by Luciano Garelli
Fri Dec 06, 2019 4:47 pm
Forum: Code_Saturne usage
Topic: How to get the coordinates of specific cells?
Replies: 4
Views: 356

Re: How to get the coordinates of specific cells?

Hello, In the Doxygen documentation that I posted previously is the data about your question. If you use ncel (cs_glob_mesh->n_cells) you will get the local number of cells in case of parallelism. If you use ncelet (cs_glob_mesh->n_cells_with_ghosts) you will get the local number of cells plus the g...
by Luciano Garelli
Thu Dec 05, 2019 12:35 pm
Forum: Code_Saturne usage
Topic: How to get the coordinates of specific cells?
Replies: 4
Views: 356

Re: How to get the coordinates of specific cells?

Hello, Yes, there is. Depending if you are working on C or Fortran. Check in the Example directory for xyzcen() (fortran) or for cell_cen() (C), you will find a lot of example of use. Also in the Doxygen documentation https://www.code-saturne.org/cms/sites/default/files/docs/5.0/doxygen/src/mesh.htm...
by Luciano Garelli
Fri Nov 29, 2019 6:10 pm
Forum: Code_Saturne usage
Topic: ALE simulations: local fluid force on specific rigid body positions
Replies: 14
Views: 1752

Re: ALE simulations: local fluid force on specific rigid body positions

Hello, Both are taken into account, pressure and viscous forces. You can check the file post_util.f90. In this file the forces are used to compute normal and tangential stresses to be the post-processed in salome. Also I guess that in the forum there are several post about the force posprocessing. R...
by Luciano Garelli
Fri Nov 29, 2019 3:26 pm
Forum: Code_Saturne usage
Topic: ALE simulations: local fluid force on specific rigid body positions
Replies: 14
Views: 1752

Re: ALE simulations: local fluid force on specific rigid body positions

Hello,

You can check the user example cs_user_extra_operations-global_efforts.f90 file. You don't need to multiply by the face area.
Are you running in parallel or serial? Because if you run in parallel you have to do a parallel sum of this variable and the same for the forces.

Regards,
Luciano
by Luciano Garelli
Fri Nov 22, 2019 1:55 pm
Forum: Code_Saturne usage
Topic: ALE simulations: local fluid force on specific rigid body positions
Replies: 14
Views: 1752

Re: ALE simulations: local fluid force on specific rigid body positions

Hello, I think that the problem is not the write line. The forstr array has dimension(3,nstrmx), I think if you want to compute the fluid forces acting on the structure you have to use the iforbr field id. Take a look at the files cs_user_fluid_structure_interaction.f90 and cs_user_extra_operations-...
by Luciano Garelli
Thu Nov 21, 2019 1:03 pm
Forum: Code_Saturne usage
Topic: ALE simulations: local fluid force on specific rigid body positions
Replies: 14
Views: 1752

Re: ALE simulations: local fluid force on specific rigid body positions

Hello, Maybe the error is that the file does not exist and can not be appended the data. Try adding open(impout,file='force_1_x.dat', status="unknown" , position="append") When I write some data to a file, in the first iteration I create the file, write some header with info about the data to be wri...