Hello guys,
I am a new user of code_saturne 3.0.1. I tried to set a heated pipe flow case. The velocity and temperature of the inlet flow, as well as, the heat flux on the pipe wall are defined in the 'cs_user_boundary_conditions.f90'. But the simulation failed. The message shown in the 'listing' says that the inlet flow boundary condition was incomplete. But if I did not turn on energy equation and thermal boundary conditions the 'cs_user_boundary_conditions.f90' works fine on the same mesh.
Three documents related to the heated pipe flow simulation is attached. Can you please have a look and give me some suggestion. If you have some relevant examples, please let me know.
P.S. To upload 'listing', the extension '.log' had been added it.
Kindest regards,
Yu.
Problems on the boundary setting for the heated pipe flow
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
-
- Posts: 74
- Joined: Fri Aug 02, 2013 4:26 pm
Problems on the boundary setting for the heated pipe flow
- Attachments
-
- listing.log
- (33.96 KiB) Downloaded 187 times
-
- preprocessor.log
- (5.67 KiB) Downloaded 189 times
-
- cs_user_boundary_conditions.f90
- (21.48 KiB) Downloaded 188 times
Re: Problems on the boundary setting for the heated pipe flo
Hello Yu,
I'll have a look today and get back to you.
Regards,
Brian Angel.
I'll have a look today and get back to you.
Regards,
Brian Angel.
Re: Problems on the boundary setting for the heated pipe flo
Hello Yu,
I have modified your user routine and tested it on a rectangular duct using the same boundary condition definitions (INLET, OUTLET, WAL) and Code_Saturne V3.0. It works okay. The modified routine is attached. The problem was using the names 'itemp' and 'ivar'. The temperature and wall fluxes are treated as scalars via the variable isca(i). In the SRC/EXAMPLES directory please take a look at the file 'cs_users_boundary_conditions-base.f90' where there are examples for wall boundary conditions. Also, for the inlet boundary, the temperature should be defined as Dirichlet and not Neumann:
icodcl(ifac, isca(1))=1
Please try the attached routine and let me know if it works.
It is also possible to define all the boundary conditions that you are using in the Code_Saturne GUI (please see the attached xml file). It is advised to do this as there are a number of changes between V3.0 and more recent versions that will require the modification of the coding in this routine. Hence, to avoid unnecesary coding in the future, please try to use the GUI as much as possible.
Regards,
Brian Angel.
I have modified your user routine and tested it on a rectangular duct using the same boundary condition definitions (INLET, OUTLET, WAL) and Code_Saturne V3.0. It works okay. The modified routine is attached. The problem was using the names 'itemp' and 'ivar'. The temperature and wall fluxes are treated as scalars via the variable isca(i). In the SRC/EXAMPLES directory please take a look at the file 'cs_users_boundary_conditions-base.f90' where there are examples for wall boundary conditions. Also, for the inlet boundary, the temperature should be defined as Dirichlet and not Neumann:
icodcl(ifac, isca(1))=1
Please try the attached routine and let me know if it works.
It is also possible to define all the boundary conditions that you are using in the Code_Saturne GUI (please see the attached xml file). It is advised to do this as there are a number of changes between V3.0 and more recent versions that will require the modification of the coding in this routine. Hence, to avoid unnecesary coding in the future, please try to use the GUI as much as possible.
Regards,
Brian Angel.
- Attachments
-
- HEATED_PIPE.xml
- (7.52 KiB) Downloaded 184 times
-
- cs_user_boundary_conditions.f90
- (12.27 KiB) Downloaded 192 times
-
- Posts: 74
- Joined: Fri Aug 02, 2013 4:26 pm
Re: Problems on the boundary setting for the heated pipe flo
Hi Brian,
Thanks for your reply. I will have a try.
I have another question. Where can I find the correspondence between variable in the subroutine and the variable in the theory. for example isca(1) would stand for temperature in 'cs_user_boundary_conditions.f90'.
Thanks again,
Yu.
Thanks for your reply. I will have a try.
I have another question. Where can I find the correspondence between variable in the subroutine and the variable in the theory. for example isca(1) would stand for temperature in 'cs_user_boundary_conditions.f90'.
Thanks again,
Yu.
Brian Angel wrote:Hello Yu,
I have modified your user routine and tested it on a rectangular duct using the same boundary condition definitions (INLET, OUTLET, WAL) and Code_Saturne V3.0. It works okay. The modified routine is attached. The problem was using the names 'itemp' and 'ivar'. The temperature and wall fluxes are treated as scalars via the variable isca(i). In the SRC/EXAMPLES directory please take a look at the file 'cs_users_boundary_conditions-base.f90' where there are examples for wall boundary conditions. Also, for the inlet boundary, the temperature should be defined as Dirichlet and not Neumann:
icodcl(ifac, isca(1))=1
Please try the attached routine and let me know if it works.
It is also possible to define all the boundary conditions that you are using in the Code_Saturne GUI (please see the attached xml file). It is advised to do this as there are a number of changes between V3.0 and more recent versions that will require the modification of the coding in this routine. Hence, to avoid unnecesary coding in the future, please try to use the GUI as much as possible.
Regards,
Brian Angel.
Re: Problems on the boundary setting for the heated pipe flo
Hello Yu,
If you have a look in the V3.0 CS user guide in:
§3.9.3.3 : Physical variables (page 34)
§6.4.1 : Basic Modelling Setup > Coding of Standard Boundary Conditions
you will find some info relating to isca.
In the routine I put on this forum, there is a coding error. For the heat flux you will need to change:
icodcl(ifac,isca(3)) = 3
rcodcl(ifac,isca(3),3) = 1000.0d0
to:
icodcl(ifac,isca(iscalt)) = 3
rcodcl(ifac,isca(iscalt),3) = 1000.0d0
Best regards,
Brian Angel.
If you have a look in the V3.0 CS user guide in:
§3.9.3.3 : Physical variables (page 34)
§6.4.1 : Basic Modelling Setup > Coding of Standard Boundary Conditions
you will find some info relating to isca.
In the routine I put on this forum, there is a coding error. For the heat flux you will need to change:
icodcl(ifac,isca(3)) = 3
rcodcl(ifac,isca(3),3) = 1000.0d0
to:
icodcl(ifac,isca(iscalt)) = 3
rcodcl(ifac,isca(iscalt),3) = 1000.0d0
Best regards,
Brian Angel.
-
- Posts: 74
- Joined: Fri Aug 02, 2013 4:26 pm
Re: Problems on the boundary setting for the heated pipe flo
Hi Brian,
Thanks very much, The boundary conditions works now.
I found there two improper declarations in the subroutine.
The temperature of inlet flow should be defined as
icodcl(ifac, isca(iscalt)) = 1
rcodcl(ifac, isca(iscalt), 1) = 325.0d0
while, the heat flux on the wall should be defined as
icodcl(ifac, ivar) = 3
rcodcl(ifac, ivar, 3) = 1000.0d0.
But I am not sure this slightly difference is due to my version, which is 3.0.1 or the mistakes.
Thanks again,
Yu.
Thanks very much, The boundary conditions works now.
I found there two improper declarations in the subroutine.
The temperature of inlet flow should be defined as
icodcl(ifac, isca(iscalt)) = 1
rcodcl(ifac, isca(iscalt), 1) = 325.0d0
while, the heat flux on the wall should be defined as
icodcl(ifac, ivar) = 3
rcodcl(ifac, ivar, 3) = 1000.0d0.
But I am not sure this slightly difference is due to my version, which is 3.0.1 or the mistakes.
Thanks again,
Yu.
Brian Angel wrote:Hello Yu,
If you have a look in the V3.0 CS user guide in:
§3.9.3.3 : Physical variables (page 34)
§6.4.1 : Basic Modelling Setup > Coding of Standard Boundary Conditions
you will find some info relating to isca.
In the routine I put on this forum, there is a coding error. For the heat flux you will need to change:
icodcl(ifac,isca(3)) = 3
rcodcl(ifac,isca(3),3) = 1000.0d0
to:
icodcl(ifac,isca(iscalt)) = 3
rcodcl(ifac,isca(iscalt),3) = 1000.0d0
Best regards,
Brian Angel.