Search found 230 matches

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: 53

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: 53

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: 1092

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: 1092

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: 1092

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: 1092

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...
by Luciano Garelli
Tue Nov 19, 2019 7:00 pm
Forum: Code_Saturne usage
Topic: Use of passive scalar
Replies: 3
Views: 114

Re: Use of passive scalar

Hello,

Yes, set a prefixed (Dirichlet) value for the scalars at the fluid inlets (in the boundary condition tab). Additionally you can set different scalar for the different inlets.

Regards,

Luciano
by Luciano Garelli
Tue Nov 19, 2019 5:40 pm
Forum: Code_Saturne usage
Topic: Use of passive scalar
Replies: 3
Views: 114

Re: Use of passive scalar

Hello,

This error is strange because in the subroutine uitssc the lambda coefficient is used for groundwater flows.

Another way to track the scalars is set an inlet value for each scalar and the track the evolution. Using this way you avoid the use of the source term.

Regards,

Luciano
by Luciano Garelli
Tue Nov 12, 2019 2:02 pm
Forum: Code_Saturne usage
Topic: Parallel computation of loops
Replies: 4
Views: 450

Re: Parallel computation of loops

Hello, cs_glob_rank_id will give you the rank of a MPI process in case of parallelism and it will take the values between 0<=cs_glob_rank_id< number of process. In case of a serial run cs_glob_rank_id =-1 , so only process of rank=0 (parallel) or -1 (serial) will write to this file. In you code, the...
by Luciano Garelli
Wed Oct 16, 2019 9:25 am
Forum: Code_Saturne usage
Topic: ALE simulations: local fluid force on specific rigid body positions
Replies: 14
Views: 1092

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

Hello, But these "points" should be associated to some surface or area in order to compute forces, or chose the boundary face in the rigid body which contain or is placed the point. After you have selected the face or surface(faces) you can computed the forces using the cs_user_extra_operations, whi...