Hi everyone,
I have a file with all the velocity components for the y-coordinate, is there a way to read this file in code saturne?
Thanks for your help
andrea
Velocity profile from file
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
-
- Posts: 284
- Joined: Fri Dec 04, 2015 1:42 pm
Re: Velocity profile from file
Hello,
Do you want to use this velocity field to initialize the simulation?. If so, please check the cs_user_initialization-base.f90 and cs_user_initialization-compressible.f90 files at /SRC/EXAMPLES
Regards,
Luciano
Do you want to use this velocity field to initialize the simulation?. If so, please check the cs_user_initialization-base.f90 and cs_user_initialization-compressible.f90 files at /SRC/EXAMPLES
Regards,
Luciano
Re: Velocity profile from file
Thanks for the reply, no is a boundary condition.
-
- Posts: 284
- Joined: Fri Dec 04, 2015 1:42 pm
Re: Velocity profile from file
Ok,
Did you check cs_user_boundary_conditions-base.f90, cs_user_boundary_conditions-advanced.f90, cs_user_boundary_conditions-mapped_inlet.f90 ?
The file with the velocity comes from another simulation with a different mesh or same mesh? If the profile comes from a different mesh you will have to map or interpolate the values.
Also check this post http://code-saturne.org/forum/viewtopic.php?f=2&t=1872
Regards,
Luciano
Did you check cs_user_boundary_conditions-base.f90, cs_user_boundary_conditions-advanced.f90, cs_user_boundary_conditions-mapped_inlet.f90 ?
The file with the velocity comes from another simulation with a different mesh or same mesh? If the profile comes from a different mesh you will have to map or interpolate the values.
Also check this post http://code-saturne.org/forum/viewtopic.php?f=2&t=1872
Regards,
Luciano
Re: Velocity profile from file
Hi,Luciano Garelli wrote:Ok,
Did you check cs_user_boundary_conditions-base.f90, cs_user_boundary_conditions-advanced.f90, cs_user_boundary_conditions-mapped_inlet.f90 ?
The file with the velocity comes from another simulation with a different mesh or same mesh? If the profile comes from a different mesh you will have to map or interpolate the values.
Also check this post http://code-saturne.org/forum/viewtopic.php?f=2&t=1872
Regards,
Luciano
Yes the mesh is the same. I checked the files, but what for me is not clear is how to loop over the y-coordinate.
Thanks for your time.
-
- Posts: 284
- Joined: Fri Dec 04, 2015 1:42 pm
Re: Velocity profile from file
Hello,
Inside of the boundary faces loop, you can access to the coordinates of the centers of the boundary faces thought the pointer cdgfbo
Regards,
Luciano
Inside of the boundary faces loop, you can access to the coordinates of the centers of the boundary faces thought the pointer cdgfbo
Code: Select all
! Boundary faces of group '3'
call getfbr('3', nlelt, lstelt)
do ilelt = 1, nlelt
ifac = lstelt(ilelt)
! y-coordinate Face center
ycoord = cdgfbo(2, ifac)
enddo
Luciano