Branch CBC (Consistent boundary conditions) Parent: tag Diego_version_for_linux; SVN-r91 In this branch will be implemented a consistent scheme for the boundary conditions. A consistent scheme is the one that reduces to the exact BC as the mesh is refined. r187 ==== File comments.txt added. r188 ==== Added the subroutine 'get_mass_conservation_check' that calculates the norm L_inf of the res. of the mass conservation. MAIN RESULTS 3.2810640276420684E+00 .....: fmi - Mass flow rate in the entrance (kg/s) 3.2810640276420697E+00 .....: fme - Mass flow rate in the exit (kg/s) 3.3278989266478334E+03 .....: Fd - Dynamic thrust (N) 2.5023386140965442E-16 .....: RESMC - Norm L_inf of the res. of the mass conservation (kg/s) 1.0227000000071712E+01 .....: tcpu - CPU time (s) r189 ==== Added subroutine 'save_main_fields' for further comparisons. Modified 'post_processing_boundaries' subroutine. Added subroutine 'write_fields_on_boundaries'. Added subroutine 'plotter07' to plot boundary fields. MAIN RESULTS 3.2810640276420684E+00 .....: fmi - Mass flow rate in the entrance (kg/s) 3.2810640276420697E+00 .....: fme - Mass flow rate in the exit (kg/s) 3.3278989266478334E+03 .....: Fd - Dynamic thrust (N) 2.5023386140965442E-16 .....: RESMC - Norm L_inf of the res. of the mass conservation (kg/s) 9.3939999999711290E+00 .....: tcpu - CPU time (s) Test of dt-effect ----------------- dt=1e-5 3.2810640276420684E+00 .....: fmi - Mass flow rate in the entrance (kg/s) 3.2810640276420697E+00 .....: fme - Mass flow rate in the exit (kg/s) dt=1e-6 3.2810640276420346E+00 .....: fmi - Mass flow rate in the entrance (kg/s) 3.2810640276420662E+00 .....: fme - Mass flow rate in the exit (kg/s) dt=1e-7 3.2810640276409551E+00 .....: fmi - Mass flow rate in the entrance (kg/s) 3.2810640276421323E+00 .....: fme - Mass flow rate in the exit (kg/s) dt=1e-5 3.3278989266478334E+03 .....: Fd - Dynamic thrust (N) dt=1e-6 3.3279100885934745E+03 .....: Fd - Dynamic thrust (N) dt=1e-7 3.3279100885931780E+03 .....: Fd - Dynamic thrust (N) The mass flow rate and the dynamic trust are affected by dt. r190 ==== The simplified BC for the temperature was implemented. MAIN RESULTS previous 3.2810640276420684E+00 .....: fmi - Mass flow rate in the entrance (kg/s) current 3.2810640276420684E+00 .....: fmi - Mass flow rate in the entrance (kg/s) previous 3.2810640276420697E+00 .....: fme - Mass flow rate in the exit (kg/s) current 3.2810640276420697E+00 .....: fme - Mass flow rate in the exit (kg/s) previous 3.3278989266478334E+03 .....: Fd - Dynamic thrust (N) current 3.3278989266478334E+03 .....: Fd - Dynamic thrust (N) No changes in the mass flow rate and Fd was observed. The variables u, v, T and p, evaluated at nodes and over the boundaries, were compared with those of r189. The following table shows the maximum relative difference. Max. relative difference Var. Node South North West East u 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 v 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 T 0.000E+00 0.000E+00 0.000E+00 0.000E+00 4.094E-03 p 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 The only affected variable was the temperature on the east boundary. The relative difference do not exceed 0.5%. r191 ==== The simplified BC for the pressure deviation was implemented. Pressure extrapolation to fictitious in the 'get_initial_guess' subroutine was changed. MAIN RESULTS previous 3.2810640276420684E+00 .....: fmi - Mass flow rate in the entrance (kg/s) current 3.2810640276420719E+00 .....: fmi - Mass flow rate in the entrance (kg/s) previous 3.2810640276420697E+00 .....: fme - Mass flow rate in the exit (kg/s) current 3.2810640276420706E+00 .....: fme - Mass flow rate in the exit (kg/s) previous 3.3278989266478334E+03 .....: Fd - Dynamic thrust (N) current 3.3124021180111745E+03 .....: Fd - Dynamic thrust (N) No significative change in the mass flow rate occured, but the dynamic trust changed by approximately 0.5%. The results of the current revision (r191) were compared with those of revision r190. The following results were obtained Max. relative difference Var. Node South North West East u 4.181E-03 0.000E+00 0.000E+00 0.000E+00 0.000E+00 v 3.606E-03 0.000E+00 0.000E+00 0.000E+00 0.000E+00 T 1.394E-02 8.373E-03 1.394E-02 5.467E-16 1.394E-02 p 2.094E-02 1.152E-02 2.094E-02 9.518E-16 3.611E-02 The pressure and the temperature fields were the most affected, with a relative deviation of the order of 3.6%. The velocity fields were changed only on the nodes, with a relative deviation of about 0.4%. r192 ==== The subroutine 'get_p_and_ro_extrapolation_to_fictitious' was implemented. Comparing the results of the current revision (r192) with those of the previous one (r191) it was found the following results Max. relative difference Var. Node South North West East u 1.201E-05 0.000E+00 0.000E+00 0.000E+00 0.000E+00 v 3.988E-05 0.000E+00 0.000E+00 0.000E+00 0.000E+00 T 4.408E-05 4.408E-05 3.639E-06 5.461E-16 4.408E-05 p 5.977E-05 5.977E-05 6.868E-06 4.076E-16 1.076E-04 The pressure and temperature fields were changed by no more than 0.01%, while the velocities u and v were changed by less than 0.001%. Test of dt-effect ----------------- dt 1E-5 3.2810640276420684E+00 .....: fmi - Mass flow rate in the entrance (kg/s) 1E-6 3.2810640276420662E+00 .....: fmi - Mass flow rate in the entrance (kg/s) 1E-7 3.2810640276408991E+00 .....: fmi - Mass flow rate in the entrance (kg/s) dt 1E-5 3.2810640276420711E+00 .....: fme - Mass flow rate in the exit (kg/s) 1E-6 3.2810640276420608E+00 .....: fme - Mass flow rate in the exit (kg/s) 1E-7 3.2810640276421075E+00 .....: fme - Mass flow rate in the exit (kg/s) dt 1E-5 3.3124267699298543E+03 .....: Fd - Dynamic thrust (N) 1E-6 3.3124267699298507E+03 .....: Fd - Dynamic thrust (N) 1E-7 3.3124267699297829E+03 .....: Fd - Dynamic thrust (N) The greatest relative difference of the mass flow rate was of the order 1E-13, while the same relative dif. for the dynamic thrust was of the order 1E-14. So, one can say that the dt-effect disapeared. r193 ==== The simplified BC for the velocities u and v were implemented. Comparing the results of r192 with those of r193, it was found the following results previous 3.2810640276420684E+00 .....: fmi - Mass flow rate in the entrance (kg/s) current 3.2812004755405817E+00 .....: fmi - Mass flow rate in the entrance (kg/s) previous 3.2810640276420711E+00 .....: fme - Mass flow rate in the exit (kg/s) current 3.2812004755405808E+00 .....: fme - Mass flow rate in the exit (kg/s) previous 3.3124267699298543E+03 .....: Fd - Dynamic thrust (N) current 3.3099553704612395E+03 .....: Fd - Dynamic thrust (N) The mass flow rate had a relative variation of 4E-5 while the the relative deviation of the dynamic thrust was of 8E-4. Max. relative difference Var. Node South North West East u 2.412E-02 0.000E+00 0.000E+00 0.000E+00 0.000E+00 v 5.514E-02 0.000E+00 0.000E+00 0.000E+00 0.000E+00 T 3.407E-04 2.122E-04 3.407E-04 2.658E-05 3.407E-04 p 1.272E-03 8.469E-04 1.272E-03 3.496E-05 1.272E-03 The u and v fields were the most affected. Their relative deviation do not exceed 6%. r194 ==== The subroutine 'get_Uce_Vcn_at_boundary_faces' was renamed to 'get_velocities_at_boundary_faces'. This subroutine calculates ue, ve, un and vn on the boundaries, besides Uce and Vcn. Comparing the results of the previous revision (r193) with those of the present one (r194), it was found the following values previous 3.2812004755405817E+00 .....: fmi - Mass flow rate in the entrance (kg/s) current 3.2812004755405817E+00 .....: fmi - Mass flow rate in the entrance (kg/s) previous 3.2812004755405808E+00 .....: fme - Mass flow rate in the exit (kg/s) current 3.2812004755405808E+00 .....: fme - Mass flow rate in the exit (kg/s) previous 3.3099553704612395E+03 .....: Fd - Dynamic thrust (N) current 3.3099553704612395E+03 .....: Fd - Dynamic thrust (N) There was no difference in the mass flow rate and dynamic thrust. Max. relative difference Var. Node South North West East u 0.000E+00 Infinity Infinity 7.435E-01 1.024E-01 v 0.000E+00 0.000E+00 Infinity Infinity Infinity T 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 p 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 There were no differences in the pressure and temperature field. The velocities u and v varied only on the boundary faces. This occured because they were not calculated before. r195 ==== The declaration, allocation and initialization of the variables g was moved to the 'data' module. Removed unnecessary variables pina and plin. Removed unnecessary subroutine 'get_plin_and_p_fictitious' Removed unnecessary variables in the subroutine 'set_bcT' Comparing the results of the previous revision (r194) with those of the present one (r195), it was found the following values previous 3.2812004755405817E+00 .....: fmi - Mass flow rate in the entrance (kg/s) current 3.2812004755405804E+00 .....: fmi - Mass flow rate in the entrance (kg/s) previous 3.2812004755405808E+00 .....: fme - Mass flow rate in the exit (kg/s) current 3.2812004755405817E+00 .....: fme - Mass flow rate in the exit (kg/s) previous 3.3099553704612395E+03 .....: Fd - Dynamic thrust (N) current 3.3099553704612399E+03 .....: Fd - Dynamic thrust (N) Max. relative difference Var. Node South North West East u 4.173E-14 3.720E-15 2.603E-14 4.023E-14 6.626E-16 v 1.777E-12 0.000E+00 2.617E-14 Infinity 6.414E-14 T 2.225E-15 1.651E-15 2.211E-15 4.096E-16 1.798E-15 p 9.517E-16 9.517E-16 6.765E-16 4.078E-16 6.697E-16 The mass flow rate and the dynamic thrust changed by less than 1E-15. The most affected field was the component v of the velocity, that changed by 2E-12, at most. The others fields changed by less than 5E-14. r196 ==== The numerical scheme of the temperature BC on the north boundary was changed in the case of an adiabatic wall. The scheme takes into account the derivatives of T relatively to eta and ksi. Comparing the results of the previous revision (r195) with those of the present one (r196), it was found the following results previous 3.2812004755405804E+00 .....: fmi - Mass flow rate in the entrance (kg/s) current 3.2812004755405804E+00 .....: fmi - Mass flow rate in the entrance (kg/s) previous 3.2812004755405817E+00 .....: fme - Mass flow rate in the exit (kg/s) current 3.2812004755405817E+00 .....: fme - Mass flow rate in the exit (kg/s) previous 3.3099553704612399E+03 .....: Fd - Dynamic thrust (N) current 3.3099553704612399E+03 .....: Fd - Dynamic thrust (N) Max. relative difference Var. Node South North West East u 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 v 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 T 0.000E+00 0.000E+00 2.470E-03 0.000E+00 0.000E+00 p 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 The mass flow rante and the dynamic thrust did not chaged. None of the fields u, v, T and p changed, except T on the north boundary, which changed by less than 0.3%. r197 ==== It was implemented the subroutine 'get_Vce' to calculate the contravariant velocity V on the east boundary. This variable will be used in the calculation of the boundary conditions for u, v, T and p. However, the correct application of this subroutine depends on the calculation of ue and ve on the east boundary. These variables are not updated on the boundaries after the pressure correction. The results of this revision (r197) were compared to those of the previous one (r196) and it was not found any difference. previous 3.2812004755405804E+00 .....: fmi - Mass flow rate in the entrance (kg/s) current 3.2812004755405804E+00 .....: fmi - Mass flow rate in the entrance (kg/s) previous 3.2812004755405817E+00 .....: fme - Mass flow rate in the exit (kg/s) current 3.2812004755405817E+00 .....: fme - Mass flow rate in the exit (kg/s) previous 3.3099553704612399E+03 .....: Fd - Dynamic thrust (N) current 3.3099553704612399E+03 .....: Fd - Dynamic thrust (N) r198 ==== Subroutines 'get_velocities_at_internal_faces_with_pl' and 'get_Uce_Vcn_at_boundary_faces_with_pl' were replaced by 'get_velocities_at_faces_with_pl'. The last subroutine updates the velocities ue, ve, un, vn, Uce and Vcn over interfaces of volumes and over boundary faces. The subroutine 'get_boundary_simplec_coefficients' was modified so that it gives, due, dve, dun, dvn, besides de and dn. The calculation of de and dn in the subroutine 'get_initial_guess' was removed, because it was not necessary. Comparing the results of revision r196 with those of the present revision (r198) it was found the following results previous 3.2812004755405804E+00 .....: fmi - Mass flow rate in the entrance (kg/s) current 3.2812004755405830E+00 .....: fmi - Mass flow rate in the entrance (kg/s) previous 3.2812004755405817E+00 .....: fme - Mass flow rate in the exit (kg/s) current 3.2812004755405804E+00 .....: fme - Mass flow rate in the exit (kg/s) previous 3.3099553704612399E+03 .....: Fd - Dynamic thrust (N) current 3.3099553704612395E+03 .....: Fd - Dynamic thrust (N) Max. relative difference Var. Node South North West East u 3.631E-14 5.102E-15 3.065E-14 2.205E-14 8.966E-16 v 3.061E-12 0.000E+00 3.074E-14 Infinity 1.263E-13 T 3.142E-15 1.379E-15 3.278E-15 2.734E-16 1.402E-15 p 9.009E-16 4.057E-16 5.677E-16 4.059E-16 4.306E-16 The relative difference in the mass flow rate and in the dynamic thrust was less than 1E-15. Among the fields u, v, T and p, the most affected was v, which had a maximum relative deviation of 3E-12. The others variables varied by less than 4E-14. r199 ==== The consistent numerical scheme for the temperature on the east boundary was implemented in the subroutine 'set_bcT'. Comparing the results of the previous revision (r198) with those of the present one (r199), it was found the following results previous 3.2812004755405830E+00 .....: fmi - Mass flow rate in the entrance (kg/s) current 3.2812004755405830E+00 .....: fmi - Mass flow rate in the entrance (kg/s) previous 3.2812004755405804E+00 .....: fme - Mass flow rate in the exit (kg/s) current 3.2812004755405804E+00 .....: fme - Mass flow rate in the exit (kg/s) previous 3.3099553704612395E+03 .....: Fd - Dynamic thrust (N) current 3.3099553704612395E+03 .....: Fd - Dynamic thrust (N) Max. relative difference Var. Node South North West East u 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 v 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 T 0.000E+00 0.000E+00 0.000E+00 0.000E+00 2.274E-04 p 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 There were not differences in the mass flow rate and dynamic thrust. Among the fields u, v, T and p, T on the east boundary was the only that changed, by an amount of 0.02%. r200 ==== Subroutine 'get_p_and_ro_extrapolation_to_fictitious' was changed in order to implement the consistent numerical scheme for the boundary conditions of p on the north and east boundaries. A subroutine 'get_p_ksi_and_p_eta' was implemented to calculate the derivative of p relatively to ksi on the north boundary and relatively to eta on the east boundary. These derivatives are necessary in the subroutine 'get_p_and_ro_extrapolation_to_fictitious'. Comparing the results of the previous revision (r199) with those of the current one (r200), it was found the following results previous 3.2812004755405830E+00 .....: fmi - Mass flow rate in the entrance (kg/s) current 3.2714066384626030E+00 .....: fmi - Mass flow rate in the entrance (kg/s) previous 3.2812004755405804E+00 .....: fme - Mass flow rate in the exit (kg/s) current 3.2714066384626066E+00 .....: fme - Mass flow rate in the exit (kg/s) previous 3.3099553704612395E+03 .....: Fd - Dynamic thrust (N) current 3.2984290238854687E+03 .....: Fd - Dynamic thrust (N) Max. relative difference Var. Node South North West East u 1.007E-01 1.907E-03 7.051E-02 7.705E-03 9.532E-03 v 1.409E+00 0.000E+00 7.051E-02 Infinity 3.041E-02 T 1.692E-02 8.298E-04 1.695E-02 5.326E-06 1.255E-02 p 1.983E-02 3.317E-03 1.878E-02 1.866E-05 7.931E-03 The mass flow rate and the dynamic thrust changed by about 0.3%. Among the fields u, v, T and p, v had the greatest relative variation (140%), followed by u (10%), p (2%) and T (1.7%). r201 ==== Subroutines 'set_bcu', 'set_bcv' and 'get_u_v_at_fictitious_nodes_with_pl' were modified in order to apply the consistent numerical scheme on the east boundary for u and v. In the subrutine 'get_initial_guess', the initialization of u and v in the fictitious volumes was done with a extrapolation based on the simplified boundary conditions. A subroutine 'get_phi_eta' was implemented to calculate the derivative of u and v relatively to eta on the east boundary. Comparing the results of the previous revision (r200) with those of the present one (r201), it was found the following results previous 3.2714066384626030E+00 .....: fmi - Mass flow rate in the entrance (kg/s) current 3.2714066384626070E+00 .....: fmi - Mass flow rate in the entrance (kg/s) previous 3.2714066384626066E+00 .....: fme - Mass flow rate in the exit (kg/s) current 3.2714066384626048E+00 .....: fme - Mass flow rate in the exit (kg/s) previous 3.3099553704612395E+03 .....: Fd - Dynamic thrust (N) current 3.2983375254473158E+03 .....: Fd - Dynamic thrust (N) Max. relative difference Var. Node South North West East u 6.900E-06 1.913E-09 9.271E-06 2.975E-14 1.077E-04 v 4.699E-05 0.000E+00 9.271E-06 Infinity 1.203E-02 T 3.092E-05 7.010E-09 3.153E-05 2.734E-16 3.166E-05 p 1.132E-04 2.957E-08 1.180E-04 5.439E-16 1.135E-04 The the change in the mass flow rate was less than 1E-15, while the dynamic thrust had a relative variation of 0.35%. Among the fields u, T and p, the greatest relative variation was of 0.01%. The v field varied more. This occur because v is zero or close to zero in some regious, which produces large relative variations.