diff -Nru code-saturne-5.3.1+repack/debian/changelog code-saturne-5.3.2+repack/debian/changelog --- code-saturne-5.3.1+repack/debian/changelog 2019-01-19 23:30:43.000000000 +0000 +++ code-saturne-5.3.2+repack/debian/changelog 2019-02-02 15:43:25.000000000 +0000 @@ -1,3 +1,13 @@ +code-saturne (5.3.2+repack-1) unstable; urgency=medium + + * New upstream release + * Drop patches applied upstream: + - fix-doxygen-conf.patch + - fix-autoconf-mpi.patch + * d/rules: update clean target + + -- Gilles Filippini Sat, 02 Feb 2019 16:43:25 +0100 + code-saturne (5.3.1+repack-8) unstable; urgency=medium * New patch fix-doxygen-conf.patch to avoid full source path remaining diff -Nru code-saturne-5.3.1+repack/debian/patches/fix-autoconf-mpi.patch code-saturne-5.3.2+repack/debian/patches/fix-autoconf-mpi.patch --- code-saturne-5.3.1+repack/debian/patches/fix-autoconf-mpi.patch 2019-01-16 09:25:04.000000000 +0000 +++ code-saturne-5.3.2+repack/debian/patches/fix-autoconf-mpi.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -Description: MPI detection should fail when MPI support is explicitly - requested and MPI not found. -Index: code-saturne/m4/cs_mpi.m4 -=================================================================== ---- code-saturne.orig/m4/cs_mpi.m4 -+++ code-saturne/m4/cs_mpi.m4 -@@ -386,14 +386,7 @@ if test "x$cs_have_mpi_header" = "xyes" - - # MPI libraries should now have been detected - -- if test "x$cs_have_mpi" = "xno"; then -- if test "x$with_mpi" != "xcheck" ; then -- AC_MSG_FAILURE([MPI support is requested, but test for MPI failed!]) -- else -- AC_MSG_WARN([no MPI support]) -- fi -- MPI_LIBS="" -- else -+ if test "x$cs_have_mpi" != "xno"; then - # Try to detect some MPI 2 features - if test "x$mpi_io" = "xtrue"; then - AC_MSG_CHECKING([for MPI I/O]) -@@ -458,6 +451,14 @@ if test "x$cs_have_mpi_header" = "xyes" - esac - - fi -+if test "x$cs_have_mpi" = "xno"; then -+ if test "x$with_mpi" != "xcheck" ; then -+ AC_MSG_FAILURE([MPI support is requested, but test for MPI failed!]) -+ else -+ AC_MSG_WARN([no MPI support]) -+ fi -+ MPI_LIBS="" -+fi - - unset mpi_includedir - -Index: code-saturne/libple/m4/ple_mpi.m4 -=================================================================== ---- code-saturne.orig/libple/m4/ple_mpi.m4 -+++ code-saturne/libple/m4/ple_mpi.m4 -@@ -307,14 +307,7 @@ if test "x$ple_have_mpi_header" = "xyes" - - # MPI libraries should now have been detected - -- if test "x$ple_have_mpi" = "xno"; then -- if test "x$with_mpi" != "xcheck" ; then -- AC_MSG_FAILURE([MPI support is requested, but test for MPI failed!]) -- else -- AC_MSG_WARN([no MPI support]) -- fi -- MPI_LIBS="" -- else -+ if test "x$ple_have_mpi" != "xno"; then - # Try to detect some MPI 2 features - AC_MSG_CHECKING([for MPI2 one-sided communication]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], -@@ -335,6 +328,14 @@ if test "x$ple_have_mpi_header" = "xyes" - unset saved_LIBS - - fi -+if test "x$ple_have_mpi" = "xno"; then -+ if test "x$with_mpi" != "xcheck" ; then -+ AC_MSG_FAILURE([MPI support is requested, but test for MPI failed!]) -+ else -+ AC_MSG_WARN([no MPI support]) -+ fi -+ MPI_LIBS="" -+fi - - unset mpi_includedir - diff -Nru code-saturne-5.3.1+repack/debian/patches/fix-doxygen-conf.patch code-saturne-5.3.2+repack/debian/patches/fix-doxygen-conf.patch --- code-saturne-5.3.1+repack/debian/patches/fix-doxygen-conf.patch 2019-01-19 17:49:03.000000000 +0000 +++ code-saturne-5.3.2+repack/debian/patches/fix-doxygen-conf.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ -Index: code-saturne/docs/doxygen/Doxyfile-pre -=================================================================== ---- code-saturne.orig/docs/doxygen/Doxyfile-pre -+++ code-saturne/docs/doxygen/Doxyfile-pre -@@ -793,7 +793,8 @@ FILE_PATTERNS = *.c \ - *.py \ - *.f90 \ - *.f \ -- *.h -+ *.h \ -+ *.hxx - - # The RECURSIVE tag can be used to specify whether or not subdirectories should - # be searched for input files as well. -Index: code-saturne/docs/doxygen/Doxyfile-src -=================================================================== ---- code-saturne.orig/docs/doxygen/Doxyfile-src -+++ code-saturne/docs/doxygen/Doxyfile-src -@@ -793,7 +793,8 @@ FILE_PATTERNS = *.c \ - *.dox \ - *.py \ - *.f90 \ -- *.h -+ *.h \ -+ *.hxx - - # The RECURSIVE tag can be used to specify whether or not subdirectories should - # be searched for input files as well. -Index: code-saturne/docs/doxygen/Doxyfile-ui -=================================================================== ---- code-saturne.orig/docs/doxygen/Doxyfile-ui -+++ code-saturne/docs/doxygen/Doxyfile-ui -@@ -794,7 +794,8 @@ FILE_PATTERNS = *.c \ - *.py \ - *.f90 \ - *.f \ -- *.h -+ *.h \ -+ *.hxx - - # The RECURSIVE tag can be used to specify whether or not subdirectories should - # be searched for input files as well. diff -Nru code-saturne-5.3.1+repack/debian/patches/series code-saturne-5.3.2+repack/debian/patches/series --- code-saturne-5.3.1+repack/debian/patches/series 2019-01-19 17:46:44.000000000 +0000 +++ code-saturne-5.3.2+repack/debian/patches/series 2019-01-31 17:42:34.000000000 +0000 @@ -1,4 +1,2 @@ -fix-autoconf-mpi.patch no-rpath.patch source-date-in-pdf.patch -fix-doxygen-conf.patch diff -Nru code-saturne-5.3.1+repack/debian/rules code-saturne-5.3.2+repack/debian/rules --- code-saturne-5.3.1+repack/debian/rules 2019-01-19 23:09:04.000000000 +0000 +++ code-saturne-5.3.2+repack/debian/rules 2019-02-02 15:38:50.000000000 +0000 @@ -19,14 +19,9 @@ override_dh_auto_clean: dh_auto_clean -- distclean rm -f debian/epoch.tex - rm -f src/apps/cs_solver cd libple/po && rm -f *.gmo *.pot stamp-po cd po && rm -f *.gmo *.pot stamp-po - rm -f src/base/cdomod.mod - rm -f src/user_examples/user_module.mod rm -fr libple/build-aux - # Uncomment when testing two builds in a row - #echo "abort-on-upstream-changes" >debian/source/local-options override_dh_autoreconf: dh_autoreconf sbin/bootstrap diff -Nru code-saturne-5.3.1+repack/docs/doxygen/Doxyfile-pre code-saturne-5.3.2+repack/docs/doxygen/Doxyfile-pre --- code-saturne-5.3.1+repack/docs/doxygen/Doxyfile-pre 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/docs/doxygen/Doxyfile-pre 2019-01-29 18:52:54.000000000 +0000 @@ -793,7 +793,8 @@ *.py \ *.f90 \ *.f \ - *.h + *.h \ + *.hxx # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well. diff -Nru code-saturne-5.3.1+repack/docs/doxygen/Doxyfile-src code-saturne-5.3.2+repack/docs/doxygen/Doxyfile-src --- code-saturne-5.3.1+repack/docs/doxygen/Doxyfile-src 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/docs/doxygen/Doxyfile-src 2019-01-29 18:52:54.000000000 +0000 @@ -793,7 +793,8 @@ *.dox \ *.py \ *.f90 \ - *.h + *.h \ + *.hxx # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well. diff -Nru code-saturne-5.3.1+repack/docs/doxygen/Doxyfile-ui code-saturne-5.3.2+repack/docs/doxygen/Doxyfile-ui --- code-saturne-5.3.1+repack/docs/doxygen/Doxyfile-ui 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/docs/doxygen/Doxyfile-ui 2019-01-29 18:52:54.000000000 +0000 @@ -794,7 +794,8 @@ *.py \ *.f90 \ *.f \ - *.h + *.h \ + *.hxx # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well. diff -Nru code-saturne-5.3.1+repack/install_saturne.py code-saturne-5.3.2+repack/install_saturne.py --- code-saturne-5.3.1+repack/install_saturne.py 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/install_saturne.py 2019-01-29 18:52:54.000000000 +0000 @@ -410,8 +410,6 @@ line = re.sub(re_intsize32, '', line) line = re.sub(re_intsize64, '', line) line = re.sub(re_idxsize64, '-DIDXSIZE64 -DINTSIZE64', line) - if ldflags_add and line[0:7] == 'LDFLAGS': - line = line[:-1] + ldflags_add fd.write(line) @@ -599,12 +597,12 @@ Package(name="HDF5", description="Hierarchical Data Format", package="hdf5", - version="1.8.20", - archive="hdf5-1.8.20.tar.gz", - url="https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.20/src/%s") + version="1.10.4", + archive="hdf5-1.10.4.tar.gz", + url="https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.4/src/%s") p = self.packages['hdf5'] - p.config_opts = "--enable-production" + p.config_opts = "--enable-build-mode=production" # CGNS library @@ -625,8 +623,8 @@ Package(name="MED", description="Model for Exchange of Data", package="med", - version="3.3.1", - archive="med-3.3.1.tar.gz", + version="4.0.0", + archive="med-4.0.0.tar.gz", url="http://files.salome-platform.org/Salome/other/%s") p = self.packages['med'] diff -Nru code-saturne-5.3.1+repack/libple/m4/ple_mpi.m4 code-saturne-5.3.2+repack/libple/m4/ple_mpi.m4 --- code-saturne-5.3.1+repack/libple/m4/ple_mpi.m4 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/libple/m4/ple_mpi.m4 2019-01-29 18:52:54.000000000 +0000 @@ -90,7 +90,7 @@ CPPFLAGS="$saved_CPPFLAGS $MPI_CPPFLAGS" AC_CHECK_HEADERS([mpi.h], [ple_have_mpi_header=yes], - [], + [], []) fi @@ -108,7 +108,7 @@ CPPFLAGS="$saved_CPPFLAGS $MPI_CPPFLAGS" AC_CHECK_HEADERS([mpi.h], [ple_have_mpi_header=yes], - [], + [], []) fi @@ -307,14 +307,7 @@ # MPI libraries should now have been detected - if test "x$ple_have_mpi" = "xno"; then - if test "x$with_mpi" != "xcheck" ; then - AC_MSG_FAILURE([MPI support is requested, but test for MPI failed!]) - else - AC_MSG_WARN([no MPI support]) - fi - MPI_LIBS="" - else + if test "x$ple_have_mpi" != "xno"; then # Try to detect some MPI 2 features AC_MSG_CHECKING([for MPI2 one-sided communication]) AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], @@ -336,6 +329,15 @@ fi +if test "x$ple_have_mpi" = "xno"; then + if test "x$with_mpi" != "xcheck" ; then + AC_MSG_FAILURE([MPI support is requested, but test for MPI failed!]) + else + AC_MSG_WARN([no MPI support]) + fi + MPI_LIBS="" +fi + unset mpi_includedir AM_CONDITIONAL(HAVE_MPI, test x$ple_have_mpi = xyes) diff -Nru code-saturne-5.3.1+repack/libple/Makefile.am code-saturne-5.3.2+repack/libple/Makefile.am --- code-saturne-5.3.1+repack/libple/Makefile.am 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/libple/Makefile.am 2019-01-29 18:52:54.000000000 +0000 @@ -46,8 +46,8 @@ sbin/clean \ sbin/rmb -# One adds the examples sub-directories and get rid of the .svn -# directories with a dist-hook. The reason for this trick is that +# One adds the examples sub-directories with a dist-hook. +# The reason for this trick is that # the number of extra files or patches can grow and change a lot. EXTRA_DIST += examples @@ -90,7 +90,3 @@ uninstall-tests: @cd tests ; $(MAKE) uninstall-tests - -dist-hook: - -rm -rf `find $(distdir)/examples -name .svn` - diff -Nru code-saturne-5.3.1+repack/libple/po/fr.po code-saturne-5.3.2+repack/libple/po/fr.po --- code-saturne-5.3.1+repack/libple/po/fr.po 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/libple/po/fr.po 2019-01-29 18:52:54.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: ple 2.0.2\n" "Report-Msgid-Bugs-To: saturne-support@edf.fr\n" -"POT-Creation-Date: 2018-09-20 14:32+0200\n" +"POT-Creation-Date: 2019-01-15 17:43+0100\n" "PO-Revision-Date: 2015-06-27 19:21+0200\n" "Last-Translator: Yvan Fournier \n" "Language-Team: French \n" diff -Nru code-saturne-5.3.1+repack/m4/cs_medcoupling.m4 code-saturne-5.3.2+repack/m4/cs_medcoupling.m4 --- code-saturne-5.3.1+repack/m4/cs_medcoupling.m4 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/m4/cs_medcoupling.m4 2019-01-29 18:52:54.000000000 +0000 @@ -2,7 +2,7 @@ dnl dnl This file is part of Code_Saturne, a general-purpose CFD tool. dnl -dnl Copyright (C) 1998-2018 EDF S.A. +dnl Copyright (C) 1998-2019 EDF S.A. dnl dnl This program is free software; you can redistribute it and/or modify it under dnl the terms of the GNU General Public License as published by the Free Software @@ -98,7 +98,7 @@ #include ]], [[using namespace MEDCoupling; std::string f_name; - MEDCouplingFieldDouble *f = ReadFieldCell("path", "name", 0, f_name, 0, 0);]]) + MEDCouplingField *f = ReadFieldCell("path", "name", 0, f_name, 0, 0);]]) ], [ cs_have_medcoupling_loader=yes ], [ AC_MSG_WARN([no MEDCoupling file support]) ], @@ -145,7 +145,7 @@ #include ]], [[using namespace MEDCoupling; std::string f_name; - MEDCouplingFieldDouble *f = ReadFieldCell("path", "name", 0, f_name, 0, 0);]]) + MEDCouplingField *f = ReadFieldCell("path", "name", 0, f_name, 0, 0);]]) ], [ AC_DEFINE([HAVE_MEDCOUPLING], 1, [MEDCoupling support]) cs_have_medcoupling=yes @@ -173,23 +173,23 @@ CPPFLAGS="${MPI_CPPFLAGS} ${MEDCOUPLING_CPPFLAGS} ${CPPFLAGS}" - cs_paramedmem_l0="-lparamedmem" - cs_paramedmem_l1="-lparamedmem -lparamedloader" - - for cs_paramedmem_libs in "$cs_paramedmem_l0" "$cs_paramedmem_l1" - do + if test "$cs_have_medcoupling_loader" = "yes"; then + cs_paramedmem_libs="-lparamedmem -lparamedloader" + else + cs_paramedmem_libs="-lparamedmem" + fi - if test "x$cs_have_paramedmem" = "xno" ; then + if test "x$cs_have_paramedmem" = "xno" ; then - if test "$cs_have_medcoupling_loader" = "no"; then - LDFLAGS="${MEDCOUPLING_LDFLAGS} ${MPI_LDFLAGS} ${LDFLAGS}" - LIBS="${cs_paramedmem_libs} ${MEDCOUPLING_LIBS} ${MPI_LIBS} ${LIBS}" - else - LDFLAGS="${MEDCOUPLING_LDFLAGS} ${MED_LDFLAGS} ${HDF5_LDFLAGS} ${MPI_LDFLAGS} ${LDFLAGS}" - LIBS="${cs_paramedmem_libs} ${MEDCOUPLING_LIBS} ${MED_LIBS} ${HDF5_LIBS} ${MPI_LIBS} ${LIBS}" - fi + if test "$cs_have_medcoupling_loader" = "no"; then + LDFLAGS="${MEDCOUPLING_LDFLAGS} ${MPI_LDFLAGS} ${LDFLAGS}" + LIBS="${cs_paramedmem_libs} ${MEDCOUPLING_LIBS} ${MPI_LIBS} ${LIBS}" + else + LDFLAGS="${MEDCOUPLING_LDFLAGS} ${MED_LDFLAGS} ${HDF5_LDFLAGS} ${MPI_LDFLAGS} ${LDFLAGS}" + LIBS="${cs_paramedmem_libs} ${MEDCOUPLING_LIBS} ${MED_LIBS} ${HDF5_LIBS} ${MPI_LIBS} ${LIBS}" + fi - AC_LINK_IFELSE([AC_LANG_PROGRAM( + AC_LINK_IFELSE([AC_LANG_PROGRAM( [[#include #include ]], [[using namespace MEDCoupling; @@ -205,16 +205,14 @@ [ ], ) - if test "x$cs_have_paramedmem" = "xyes"; then - MEDCOUPLING_LIBS="${cs_paramedmem_libs} ${MEDCOUPLING_LIBS}" - fi - - LDFLAGS="$saved_LDFLAGS" - LIBS="$saved_LIBS" - + if test "x$cs_have_paramedmem" = "xyes"; then + MEDCOUPLING_LIBS="${cs_paramedmem_libs} ${MEDCOUPLING_LIBS}" fi - done + LDFLAGS="$saved_LDFLAGS" + LIBS="$saved_LIBS" + + fi if test "x$cs_have_paramedmem" != "xyes"; then AC_MSG_WARN([no ParaMEDMEM support]) @@ -250,6 +248,7 @@ fi AM_CONDITIONAL(HAVE_MEDCOUPLING, test x$cs_have_medcoupling = xyes) +AM_CONDITIONAL(HAVE_MEDCOUPLING_LOADER, test x$cs_have_medcoupling_loader = xyes) AM_CONDITIONAL(HAVE_PARAMEDMEM, test x$cs_have_paramedmem = xyes) AM_CONDITIONAL(HAVE_PLUGIN_MEDCOUPLING, test x$cs_have_plugin_medcoupling = xyes) @@ -259,6 +258,7 @@ fi AC_SUBST(cs_have_medcoupling) +AC_SUBST(cs_have_medcoupling_loader) AC_SUBST(cs_have_paramedmem) AC_SUBST(cs_py_have_plugin_medcoupling) AC_SUBST(MEDCOUPLING_CPPFLAGS) diff -Nru code-saturne-5.3.1+repack/m4/cs_mpi.m4 code-saturne-5.3.2+repack/m4/cs_mpi.m4 --- code-saturne-5.3.1+repack/m4/cs_mpi.m4 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/m4/cs_mpi.m4 2019-01-29 18:52:54.000000000 +0000 @@ -386,14 +386,7 @@ # MPI libraries should now have been detected - if test "x$cs_have_mpi" = "xno"; then - if test "x$with_mpi" != "xcheck" ; then - AC_MSG_FAILURE([MPI support is requested, but test for MPI failed!]) - else - AC_MSG_WARN([no MPI support]) - fi - MPI_LIBS="" - else + if test "x$cs_have_mpi" != "xno"; then # Try to detect some MPI 2 features if test "x$mpi_io" = "xtrue"; then AC_MSG_CHECKING([for MPI I/O]) @@ -459,6 +452,15 @@ fi +if test "x$cs_have_mpi" = "xno"; then + if test "x$with_mpi" != "xcheck" ; then + AC_MSG_FAILURE([MPI support is requested, but test for MPI failed!]) + else + AC_MSG_WARN([no MPI support]) + fi + MPI_LIBS="" +fi + unset mpi_includedir AC_SUBST(cs_have_mpi) diff -Nru code-saturne-5.3.1+repack/Makefile.am code-saturne-5.3.2+repack/Makefile.am --- code-saturne-5.3.1+repack/Makefile.am 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/Makefile.am 2019-01-29 18:52:54.000000000 +0000 @@ -141,8 +141,8 @@ m4/cs_scotch.m4 \ m4/cs_zlib.m4 -# One adds several sub-directories and get rid of the .svn -# directories with a dist-hook. The reason for this trick is that +# One adds several sub-directories with a dist-hook. +# The reason for this trick is that # the number of extra files or patches can grow and change a lot. EXTRA_DIST += examples extras patches @@ -371,7 +371,7 @@ update-copyright: y=`date +%Y`; yold=$$(($$y-1)); \ - lst=`find ${top_srcdir} -type d \( -name .svn -o -name .git -o -name "build*" \) -prune -o \( -type f -a ! -name Makefile.in \) -print`; \ + lst=`find ${top_srcdir} -type d \( -name .git -o -name "build*" \) -prune -o \( -type f -a ! -name Makefile.in \) -print`; \ for f in $$lst; do \ echo $$f && \ $(SED) -i "s/Copyright (C) 1998-$${yold} EDF S.A./Copyright (C) 1998-$$y EDF S.A./" $$f; \ diff -Nru code-saturne-5.3.1+repack/NEWS.md code-saturne-5.3.2+repack/NEWS.md --- code-saturne-5.3.1+repack/NEWS.md 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/NEWS.md 2019-01-29 18:52:54.000000000 +0000 @@ -1,3 +1,55 @@ +Release 5.3.2 - January 29, 2019 +-------------------------------- + +Bug fixes: + +- Fix memory leak leading to crash in legacy porosity model. + +- Fix a lagrangian module user example. + +- Fix installation of some MEDCoupling features based on modular + MEDCoupling features detection. + +- CFDSTUDY (Salome): fix issues with dissapearing windows onserved on + some actual systems such as Debian 9 and Ubuntu 16.04. + +- Lagrangian Module: + * Fix crash in restart when not reading previous statistics. + * Fix crash in some cases with no deposition model. + * Fix errors in deposition/reentrainment model. + +- Fix use of unitialized values impacting cases with head losses without + improved pressure interpolation option (iphydr=0). + +- Major fix in BCs for the pressure (excluding compressible and GWF + modules). Mainly impacting free-surface BCs. + The pressure when imposed by the user (Dirichlet or radiative outlet) + has to be specified in term of TOTAL pressure P_tot (containing the + hydrostatic part). Then the code (for accuracy purpose) convert that + into a solved pressure P using the formula: + P = P_tot - P0 - ro0 g.(X - X0) + This conversion is now done on all the faces, for all BC types where + icodcl is specified. Otherwise, an automatic value (in P) is given by + the code. + +- Fix bug in automatic turbulent BCs. They were only set if not already + initialized. Cases calling turbulent_bc_inlet_k_eps in user sources to + overwrite GUI settings were impacted. + +- Fix uncompatible pointer type assignment warning on fluid factors at face + in fully fluid case in mass flux compuation and matrix building. + +- Fix coherency check of slope test indicator with SIMPLE algorithm. + +- Fix unitialized indices in wall law for additional transported vectors and + post-processing of thermal flux at boundary. + +Architectural changes: + +- Update Melissa writer to Melissa 0.5.1. (breaking compatibility with + older versions, but is exceptionally accepted here as Melissa is + still at an experimental stage). + Release 5.3.1 - November 21, 2018 --------------------------------- @@ -45,6 +97,10 @@ User changes: +- Add the possibility to visualize the turbulent production + and buoyant terms for DRSM models + (the user only has to create "rij_production" and/or "rij_buoyancy" field). + - Move velocity-pressure algorithm settings from global numerical parameters view to time step view in GUI. "Time step" view is subsequently renamed "Time settings". @@ -79,6 +135,14 @@ - Add postprocessing of temperature and flux at internal coupling interface. +Physical modelling: + +- Make particle tracking compatible with transient turbomachinery model. + +- Major modification for K-omega SST (iturb=60) boundary condition. + * Switch from a Neumann boundary condition to a Dirichlet + boundary condition on omega. + Numerics: - Use left anisotropic diffusion scheme (legacy FV) for mesh velocity solving @@ -182,6 +246,12 @@ evaluations can be run on either the local workstation or distant machines such as computing clusters. +Default option changes: + +- Change default options for bad meshes: + CS_BAD_CELLS_WARPED_CORRECTION, CS_FACE_DISTANCE_CLIP, CS_FACE_RECONSTRUCTION + are switch on by default. + Bug fixes: - Fix initialisation of some turbulence constants. Constant/Models concerned: @@ -199,6 +269,13 @@ This was impacting cases with head losses, improved pressure interpolation, and scalar or tensorial volume porosity models (iporos=1, 2). +- Fix in the Lagrangian particle tracking: + * some minor inconsistencies were introduced on wraped faces + * local normal (of the crossed sub-triangle of the crossed face) is stored for + particle rebound at the boundary + * if the maximum number of sweeps is reached, the put the particle at the last + cell center. + Release 5.2.0 - March 30, 2018 ------------------------------ diff -Nru code-saturne-5.3.1+repack/po/fr.po code-saturne-5.3.2+repack/po/fr.po --- code-saturne-5.3.1+repack/po/fr.po 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/po/fr.po 2019-01-29 18:52:54.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: code-saturne\n" "Report-Msgid-Bugs-To: saturne-support@edf.fr\n" -"POT-Creation-Date: 2018-11-21 11:55+0100\n" +"POT-Creation-Date: 2019-01-15 17:43+0100\n" "PO-Revision-Date: 2012-01-26 12:00+0100\n" "Last-Translator: Code_Saturne \n" "Language-Team: French \n" diff -Nru code-saturne-5.3.1+repack/salome/cfd_study/src/CFDSTUDYGUI/CFDSTUDYGUI_SolverGUI.py code-saturne-5.3.2+repack/salome/cfd_study/src/CFDSTUDYGUI/CFDSTUDYGUI_SolverGUI.py --- code-saturne-5.3.1+repack/salome/cfd_study/src/CFDSTUDYGUI/CFDSTUDYGUI_SolverGUI.py 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/salome/cfd_study/src/CFDSTUDYGUI/CFDSTUDYGUI_SolverGUI.py 2019-01-29 18:52:54.000000000 +0000 @@ -552,8 +552,6 @@ _c_CFDGUI.showDocks(studyId) _c_CFDGUI.tabifyDockWindows(sgPyQt.getDesktop(),studyId) - updateObjectBrowser() - def showDockWindows(self, studyId, xmlName, caseName, studyCFDName): """ diff -Nru code-saturne-5.3.1+repack/src/alge/cs_divergence.c code-saturne-5.3.2+repack/src/alge/cs_divergence.c --- code-saturne-5.3.1+repack/src/alge/cs_divergence.c 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/src/alge/cs_divergence.c 2019-01-29 18:52:54.000000000 +0000 @@ -435,7 +435,7 @@ is_p = 1; } else { - i_f_face_factor = _i_f_face_factor; + i_f_face_factor = &_i_f_face_factor; b_f_face_factor = &_b_f_face_factor; } @@ -1987,11 +1987,8 @@ } else { - cs_real_6_t *viscce; - cs_real_6_t *w2; - - viscce = NULL; - w2 = NULL; + cs_real_6_t *viscce = NULL; + cs_real_6_t *w2 = NULL; /* Without porosity */ if (porosi == NULL) { @@ -2122,6 +2119,8 @@ * cs_math_3_dot_product(frcxt[ii], normal); } + + BFT_FREE(w2); } } diff -Nru code-saturne-5.3.1+repack/src/alge/cs_matrix_building.c code-saturne-5.3.2+repack/src/alge/cs_matrix_building.c --- code-saturne-5.3.1+repack/src/alge/cs_matrix_building.c 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/src/alge/cs_matrix_building.c 2019-01-29 18:52:54.000000000 +0000 @@ -1303,7 +1303,7 @@ is_p = 1; } else { - i_f_face_factor = _i_f_face_factor; + i_f_face_factor = &_i_f_face_factor; b_f_face_factor = &_b_f_face_factor; } @@ -1898,7 +1898,7 @@ is_p = 1; } else { - i_f_face_factor = _i_f_face_factor; + i_f_face_factor = &_i_f_face_factor; b_f_face_factor = &_b_f_face_factor; } diff -Nru code-saturne-5.3.1+repack/src/apps/Makefile.am code-saturne-5.3.2+repack/src/apps/Makefile.am --- code-saturne-5.3.1+repack/src/apps/Makefile.am 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/src/apps/Makefile.am 2019-01-29 18:52:54.000000000 +0000 @@ -249,5 +249,8 @@ $(PYTHON) -B $(top_srcdir)/build-aux/cs_compile_build.py \ --mode=install --dest "$(DESTDIR)" +clean-local: + -rm -f cs_solver$(EXEEXT) + uninstall-local: rm $(pkglibexecdir)/cs_solver$(EXEEXT) diff -Nru code-saturne-5.3.1+repack/src/atmo/attycl.f90 code-saturne-5.3.2+repack/src/atmo/attycl.f90 --- code-saturne-5.3.1+repack/src/atmo/attycl.f90 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/src/atmo/attycl.f90 2019-01-29 18:52:54.000000000 +0000 @@ -299,14 +299,11 @@ if (itypfb(ifac).eq.ientre.or.itypfb(ifac).eq.i_convective_inlet) then - if (rcodcl(ifac,iu,1).gt.rinfin*0.5d0) & - rcodcl(ifac,iu,1) = xuent - if (rcodcl(ifac,iv,1).gt.rinfin*0.5d0) & - rcodcl(ifac,iv,1) = xvent - if (rcodcl(ifac,iw,1).gt.rinfin*0.5d0) & - rcodcl(ifac,iw,1) = 0.d0 + if (rcodcl(ifac,iu,1).gt.rinfin*0.5d0) rcodcl(ifac,iu,1) = xuent + if (rcodcl(ifac,iv,1).gt.rinfin*0.5d0) rcodcl(ifac,iv,1) = xvent + if (rcodcl(ifac,iw,1).gt.rinfin*0.5d0) rcodcl(ifac,iw,1) = 0.d0 - call turbulence_bc_inlet_k_eps(ifac, xkent, xeent, rcodcl) + call turbulence_bc_set_uninit_inlet_k_eps(ifac, xkent, xeent, rcodcl) if (iscalt.ne.-1) then @@ -351,7 +348,7 @@ rcodcl(ifac,ipr,1) = coefap(ifac) ! Dirichlet on turbulent variables - call turbulence_bc_inlet_k_eps(ifac, xkent, xeent, rcodcl) + call turbulence_bc_set_uninit_inlet_k_eps(ifac, xkent, xeent, rcodcl) if (iautom(ifac).eq.1) then diff -Nru code-saturne-5.3.1+repack/src/base/clptur.f90 code-saturne-5.3.2+repack/src/base/clptur.f90 --- code-saturne-5.3.1+repack/src/base/clptur.f90 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/src/base/clptur.f90 2019-01-29 18:52:54.000000000 +0000 @@ -2947,6 +2947,8 @@ ! Test on the presence of a smooth wall condition (start) if (icodcl(ifac,iu).eq.5) then + iel = ifabor(ifac) + srfbnf = surfbn(ifac) ! Local framework diff -Nru code-saturne-5.3.1+repack/src/base/cs_c_bindings.f90 code-saturne-5.3.2+repack/src/base/cs_c_bindings.f90 --- code-saturne-5.3.1+repack/src/base/cs_c_bindings.f90 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/src/base/cs_c_bindings.f90 2019-01-29 18:52:54.000000000 +0000 @@ -750,6 +750,27 @@ !--------------------------------------------------------------------------- + !> \brief Set inlet boundary condition values for turbulence variables based + !> on given k and epsilon values only if not initialized already. + !> + !> \param[in] face_id boundary face id + !> \param[in] k turbulent kinetic energy + !> \param[in] epsilon turbulent dissipation + !> \param[out] rcodcl boundary condition values + + subroutine turbulence_bc_set_uninit_inlet_k_eps(face_num, & + k, eps, & + rcodcl) & + bind(C, name='cs_f_turbulence_bc_set_uninit_inlet_k_eps') + use, intrinsic :: iso_c_binding + implicit none + integer(c_int), value :: face_num + real(c_double), value :: k, eps + real(kind=c_double), dimension(*) :: rcodcl + end subroutine turbulence_bc_set_uninit_inlet_k_eps + + !--------------------------------------------------------------------------- + !> \brief General user parameters subroutine user_parameters() & diff -Nru code-saturne-5.3.1+repack/src/base/cs_medcoupling_remapper.cxx code-saturne-5.3.2+repack/src/base/cs_medcoupling_remapper.cxx --- code-saturne-5.3.1+repack/src/base/cs_medcoupling_remapper.cxx 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/src/base/cs_medcoupling_remapper.cxx 2019-01-29 18:52:54.000000000 +0000 @@ -5,7 +5,7 @@ /* This file is part of Code_Saturne, a general-purpose CFD tool. - Copyright (C) 1998-2018 EDF S.A. + Copyright (C) 1998-2019 EDF S.A. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -85,8 +85,10 @@ using namespace MEDCoupling; +/*! \cond DOXYGEN_SHOULD_SKIP_THIS */ + /*---------------------------------------------------------------------------- - * ParaMEDMED field structure + * Remapper structure *----------------------------------------------------------------------------*/ struct _cs_medcoupling_remapper_t { @@ -116,30 +118,36 @@ static int _n_remappers = 0; static cs_medcoupling_remapper_t **_remapper = NULL; -/*---------------------------------------------------------------------------- - * Read a MEDCoupling field (float or double) from a MEDFile and convert it to - * MEDCouplingFieldDouble * object +/*----------------------------------------------------------------------------*/ +/*! + * \brief Read a MEDCoupling field from a MEDFile and convert it to + * MEDCouplingFieldDouble + * + * \param[in] medfile_path path to the med file + * \param[in] field_name name of the field to load + * \param[in] iteration associated time iteration + * \param[in] order associated time order * - * parameters: - * medfile_path <-- path to med file - * field_name <-- field name - * iteration <-- associated iteration - * order <-- associated iteration order - *----------------------------------------------------------------------------*/ + * \return pointer to the new MEDCouplingFieldDouble struct + */ +/*----------------------------------------------------------------------------*/ static MEDCouplingFieldDouble * -_cs_medcoupling_read_field_real(const char *medfile_path, - const char *field_name, - int iteration, - int order) -{ - - MCAuto f(MEDFileAnyTypeField1TS::New(medfile_path,field_name,iteration,order)); +_cs_medcoupling_read_field_real(const char *medfile_path, + const char *field_name, + int iteration, + int order) +{ + MCAuto f(MEDFileAnyTypeField1TS::New(medfile_path, + field_name, + iteration, + order)); MCAuto mesh(MEDFileMesh::New(medfile_path,f->getMeshName())); /* Case 1: Field is a allready a double */ { - MCAuto f1(MEDCoupling::DynamicCast(f)); + MCAuto f1(MEDCoupling::DynamicCast(f)); if(f1.isNotNull()) { MEDCouplingFieldDouble *dble_field(f1->field(mesh)); return dble_field; @@ -148,42 +156,43 @@ /* Case 2: Field is a float, and we convert it to double */ { - MCAuto f1(MEDCoupling::DynamicCast(f)); + MCAuto f1(MEDCoupling::DynamicCast(f)); if(f1.isNotNull()) { MEDCouplingFieldFloat *float_field(f1->field(mesh)); MEDCouplingFieldDouble *dble_field = float_field->convertToDblField(); return dble_field; } } - } -/*---------------------------------------------------------------------------- - * Create a new cs_medcoupling_remapper_t * object. +/*----------------------------------------------------------------------------*/ +/*! + * \brief Creates a new cs_medcoupling_remapper_t struct * - * parameters: - * name <-- new object name - * elt_dim <-- element dimension - * select_criteria <-- selection criteria - * medfile_path <-- path of associated MED file - * n_fields <-- number of fields - * field_names <-- associated field names - * iteration <-- associated iteration - * iteration_order <-- associated iteration order + * \param[in] name name of the new remapper + * \param[in] elt_dim element dimension + * \param[in] select_criteria selection criteria for the elements + * \param[in] medfile_path path to the med file + * \param[in] n_fields number of fields to load + * \param[in] field_names names of the fields to load + * \param[in] iteration time iteration to load + * \param[in] order iteration order to load * - * return: - * new remapper object - *----------------------------------------------------------------------------*/ + * \return pointer to the new cs_medcoupling_remapper_t struct + * + */ +/*----------------------------------------------------------------------------*/ static cs_medcoupling_remapper_t * -_cs_paramedmem_create_remapper(const char *name, - int elt_dim, - const char *select_criteria, - const char *medfile_path, - int n_fields, - const char **field_names, - int iteration, - int iteration_order) +_create_remapper(const char *name, + int elt_dim, + const char *select_criteria, + const char *medfile_path, + int n_fields, + const char **field_names, + int iteration, + int order) { cs_medcoupling_remapper_t *r = NULL; BFT_MALLOC(r, 1, cs_medcoupling_remapper_t); @@ -205,15 +214,12 @@ } // New MEDCoupling UMesh linked to Code_Saturne mesh - cs_medcoupling_mesh_t *new_mesh = cs_medcoupling_mesh_create(name, select_criteria, elt_dim); cs_mesh_t *parent_mesh = cs_glob_mesh; - cs_medcoupling_mesh_copy_from_base(parent_mesh, new_mesh); - r->target_mesh = new_mesh; // MEDCoupling remapper (sequential interpolation) @@ -229,7 +235,7 @@ r->source_fields[ii] = _cs_medcoupling_read_field_real(medfile_path, field_names[ii], iteration, - iteration_order); + order); } @@ -251,29 +257,31 @@ return r; } -/*---------------------------------------------------------------------------- - * Add a new remapper. +/*----------------------------------------------------------------------------*/ +/*! + * \brief Add a new remapper to the list * - * parameters: - * name <-- new remapper name - * elt_dim <-- element dimension - * select_criteria <-- selection criteria - * medfile_path <-- path of associated MED file - * n_fields <-- number of fields - * field_names <-- associated field names - * iteration <-- associated iteration - * iteration_order <-- associated iteration order - *----------------------------------------------------------------------------*/ + * \param[in] name name of the new remapper + * \param[in] elt_dim element dimension + * \param[in] select_criteria selection criteria for the elements + * \param[in] medfile_path path to the med file + * \param[in] n_fields number of fields to load + * \param[in] field_names names of the fields to load + * \param[in] iteration time iteration to load + * \param[in] order iteration order to load + * + */ +/*----------------------------------------------------------------------------*/ static void -_cs_paramedmem_add_remapper(const char *name, - int elt_dim, - const char *select_criteria, - const char *medfile_path, - int n_fields, - const char **field_names, - int iteration, - int iteration_order) +_add_remapper(const char *name, + int elt_dim, + const char *select_criteria, + const char *medfile_path, + int n_fields, + const char **field_names, + int iteration, + int order) { // Allocate or reallocate if needed @@ -284,38 +292,36 @@ // Initialize new remapper, and update number of remappers - _remapper[_n_remappers] = _cs_paramedmem_create_remapper(name, - elt_dim, - select_criteria, - medfile_path, - n_fields, - field_names, - iteration, - iteration_order); + _remapper[_n_remappers] = _create_remapper(name, + elt_dim, + select_criteria, + medfile_path, + n_fields, + field_names, + iteration, + order); _n_remappers++; } -/*---------------------------------------------------------------------------- - * Copy interpolated values to a new array when no bbox is available. - * - * The caller is responsible for freeing the returned array. +/*----------------------------------------------------------------------------*/ +/*! + * \brief Interpolate values for a given field without using the reduced bbox * - * parameters: - * field_id <-- id of given field - * r <-- pointer to remapper object - * default_val <-- default value + * \param[in] r pointer to the cs_medcoupling_remapper_t struct + * \param[in] field_id id of the field to interpolate (in the list given before) + * \param[in] default_val value to apply for elements not intersected by + * source mesh * - * return: - * pointer to allocated values array - *----------------------------------------------------------------------------*/ + * \return pointer to cs_real_t array containing new values + */ +/*----------------------------------------------------------------------------*/ cs_real_t * -_cs_medcoupling_remapper_copy_values_no_bbox(cs_medcoupling_remapper_t *r, - int field_id, - double default_val) +_copy_values_no_bbox(cs_medcoupling_remapper_t *r, + int field_id, + double default_val) { - cs_lnum_t n_elts = r->target_mesh->n_elts; cs_real_t *new_vals; @@ -344,26 +350,24 @@ return new_vals; } -/*---------------------------------------------------------------------------- - * Copy interpolated values to a new array when a bbox is available. - * - * The caller is responsible for freeing the returned array. +/*----------------------------------------------------------------------------*/ +/*! + * \brief Interpolate values for a given field using the reduced bbox * - * parameters: - * field_id <-- id of given field - * r <-- pointer to remapper object - * default_val <-- default value + * \param[in] r pointer to the cs_medcoupling_remapper_t struct + * \param[in] field_id id of the field to interpolate (in list given before) + * \param[in] default_val value to apply for elements not intersected by + * source mesh * - * return: - * pointer to allocated values array - *----------------------------------------------------------------------------*/ + * \return pointer to cs_real_t array containing new values + */ +/*----------------------------------------------------------------------------*/ cs_real_t * -_cs_medcoupling_remapper_copy_values_with_bbox(cs_medcoupling_remapper_t *r, - int field_id, - double default_val) +_copy_values_with_bbox(cs_medcoupling_remapper_t *r, + int field_id, + double default_val) { - cs_lnum_t n_elts = r->target_mesh->n_elts; cs_lnum_t n_elts_loc = cs_glob_mesh->n_cells; @@ -378,9 +382,9 @@ const cs_real_t *rbbox = r->target_mesh->bbox; const DataArrayInt *subcells - = r->bbox_source_mesh->getCellsInBoundingBox(rbbox, - 1.1); - // Construct the subfields based on the subcells list + = r->bbox_source_mesh->getCellsInBoundingBox(rbbox, 1.1); + + // Construct the subfields based on the subcells list MEDCouplingFieldDouble *source_field = r->source_fields[field_id]->buildSubPart(subcells); @@ -413,24 +417,19 @@ } return new_vals; - } -/*---------------------------------------------------------------------------- - * Internal function: Creating the interpolation matrix when no bbox is available. - * - * This step is separated from the interpolation step since it only needs - * to be done once per mesh, while interpolation can be done for several - * fields. +/*----------------------------------------------------------------------------*/ +/*! + * \brief update the interpolation matrix without using the reduced bbox * - * parameters: - * r <-- remapper object - *----------------------------------------------------------------------------*/ + * \param[in] r pointer to the cs_medcoupling_remapper_t struct + */ +/*----------------------------------------------------------------------------*/ void -_cs_medcoupling_remapper_setup_no_bbox(cs_medcoupling_remapper_t *r) +_setup_no_bbox(cs_medcoupling_remapper_t *r) { - cs_lnum_t n_elts = r->target_mesh->n_elts; if (n_elts > 0) { @@ -446,22 +445,19 @@ r->target_mesh->med_mesh, r->interp_method); } - } -/*---------------------------------------------------------------------------- - * Internal function: Creating the interpolation matrix when a bbox is available. +/*----------------------------------------------------------------------------*/ +/*! + * \brief update the interpolation matrix using the reduced bbox * - * This step is separated from the interpolation step since it only needs - * to be done once per mesh, while interpolation can be done for several - * fields. + * \param[in] r pointer to the cs_medcoupling_remapper_t struct * - * parameters: - * r <-- remapper object - *----------------------------------------------------------------------------*/ + */ +/*----------------------------------------------------------------------------*/ void -_cs_medcoupling_remapper_setup_with_bbox(cs_medcoupling_remapper_t *r) +_setup_with_bbox(cs_medcoupling_remapper_t *r) { cs_lnum_t n_elts = r->target_mesh->n_elts; @@ -470,10 +466,9 @@ const cs_real_t *rbbox = r->target_mesh->bbox; const DataArrayInt *subcells - = r->bbox_source_mesh->getCellsInBoundingBox(rbbox, - 1.1); + = r->bbox_source_mesh->getCellsInBoundingBox(rbbox, 1.1); - // Construction of a subfield and the submesh associated with it. + // Construction of a subfield and the submesh associated with it. MEDCouplingFieldDouble *source_field = r->source_fields[0]->buildSubPart(subcells); @@ -489,37 +484,47 @@ r->interp_method); } } + /*----------------------------------------------------------------------------*/ +/*! (DOXYGEN_SHOULD_SKIP_THIS) \endcond */ + BEGIN_C_DECLS -/*---------------------------------------------------------------------------- - * Return remapper associated with a given id +/*============================================================================= + * Public function definitions + *============================================================================*/ + +/*----------------------------------------------------------------------------*/ +/*! + * \brief get a remapper by its id * - * parameters: - * id <-- remapper id + * \param[in] r_id id of the remapper * - * return: - * pointer to remapper - *----------------------------------------------------------------------------*/ + * \return pointer to cs_medcoupling_remapper_t struct + */ +/*----------------------------------------------------------------------------*/ cs_medcoupling_remapper_t * cs_medcoupling_remapper_by_id(int r_id) { - cs_medcoupling_remapper_t *r = _remapper[r_id]; - - return r; + if (r_id < _n_remappers) { + cs_medcoupling_remapper_t *r = _remapper[r_id]; + return r; + } else { + return NULL; + } } -/*---------------------------------------------------------------------------- - * Return remapper associated with a given name +/*----------------------------------------------------------------------------*/ +/*! + * \brief get a remapper by its name * - * parameters: - * name <-- remapper name + * \param[in] name name of the remapper * - * return: - * pointer to remapper, or NULL - *----------------------------------------------------------------------------*/ + * \return pointer to cs_medcoupling_remapper_t struct + */ +/*----------------------------------------------------------------------------*/ cs_medcoupling_remapper_t * cs_medcoupling_remapper_by_name_try(const char *name) @@ -537,23 +542,22 @@ return NULL; } -/*---------------------------------------------------------------------------- - * Create or update update the list of remappers in the case where - * several remappers may be needed. +/*----------------------------------------------------------------------------*/ +/*! + * \brief initialize a remapper based on a set of given arguments * - * parameters: - * name <-- new remapper name - * elt_dim <-- element dimension - * select_criteria <-- selection criteria - * medfile_path <-- path of associated MED file - * n_fields <-- number of fields - * field_names <-- associated field names - * iteration <-- associated iteration - * iteration_order <-- associated iteration order + * \param[in] name name of the new remapper + * \param[in] elt_dim element dimension + * \param[in] select_criteria selection criteria for the elements + * \param[in] medfile_path path to the med file + * \param[in] n_fields number of fields to load + * \param[in] field_names names of the fields to load + * \param[in] iteration time iteration to load + * \param[in] order iteration order to load * - * return: - * id of the newly added remapper within the list - *----------------------------------------------------------------------------*/ + * \return id of the new remapper + */ +/*----------------------------------------------------------------------------*/ int cs_medcoupling_remapper_initialize(const char *name, @@ -563,54 +567,52 @@ int n_fields, const char **field_names, int iteration, - int iteration_order) + int order) { - _cs_paramedmem_add_remapper(name, - elt_dim, - select_criteria, - medfile_path, - n_fields, - field_names, - iteration, - iteration_order); + _add_remapper(name, + elt_dim, + select_criteria, + medfile_path, + n_fields, + field_names, + iteration, + order); int r_id = _n_remappers - 1; return r_id; } -/*---------------------------------------------------------------------------- - * Update field values (if several time steps are available in the MED file). +/*----------------------------------------------------------------------------*/ +/*! + * \brief set and load a given time iteration from the MED file * - * parameters: - * r <-- remapper object - * iteration <-- associated iteration - * iteration_order <-- associated iteration order - *----------------------------------------------------------------------------*/ + * \param[in] r pointer to the cs_medcoupling_remapper_t struct + * \param[in] iteration time iteration to load + * \param[in] order iteration order to load + */ +/*----------------------------------------------------------------------------*/ void cs_medcoupling_remapper_set_iteration(cs_medcoupling_remapper_t *r, int iteration, - int iteration_order) + int order) { for (int i = 0; i < r->n_fields; i++) { r->source_fields[i] = _cs_medcoupling_read_field_real(r->medfile_path, r->field_names[i], iteration, - iteration_order); + order); } } -/*---------------------------------------------------------------------------- - * Create the interpolation matrix. - * - * This step is separated from the interpolation step since it only needs - * to be done once per mesh, while interpolation can be done for several - * fields. +/*----------------------------------------------------------------------------*/ +/*! + * \brief update the interpolation matrix of the remapper * - * parameters: - * r <-- remapper object - *----------------------------------------------------------------------------*/ + * \param[in] r pointer to the cs_medcoupling_remapper_t struct + */ +/*----------------------------------------------------------------------------*/ void cs_medcoupling_remapper_setup(cs_medcoupling_remapper_t *r) @@ -622,28 +624,27 @@ const cs_real_t *rbbox = r->target_mesh->bbox; if (rbbox == NULL) { - _cs_medcoupling_remapper_setup_no_bbox(r); + _setup_no_bbox(r); } else { - _cs_medcoupling_remapper_setup_with_bbox(r); + _setup_with_bbox(r); } } } -/*---------------------------------------------------------------------------- - * Copy interpolated values to a new array. - * - * The caller is responsible for freeing the returned array. +/*----------------------------------------------------------------------------*/ +/*! + * \brief Interpolate values for a given field * - * parameters: - * field_id <-- id of given field - * r <-- pointer to remapper object - * default_val <-- default value + * \param[in] r pointer to the cs_medcoupling_remapper_t struct + * \param[in] field_id id of the field to interpolate (in the list given before) + * \param[in] default_val value to apply for elements not intersected by + * source mesh * - * return: - * pointer to allocated values array - *----------------------------------------------------------------------------*/ + * \return pointer to cs_real_t array containing the new values + */ +/*----------------------------------------------------------------------------*/ cs_real_t * cs_medcoupling_remapper_copy_values(cs_medcoupling_remapper_t *r, @@ -654,26 +655,22 @@ cs_real_t *new_vals = NULL; if (r->target_mesh->elt_dim == 2) { - new_vals - = _cs_medcoupling_remapper_copy_values_no_bbox(r, field_id, default_val); + new_vals = _copy_values_no_bbox(r, field_id, default_val); } else if (r->target_mesh->elt_dim == 3) { - new_vals - = _cs_medcoupling_remapper_copy_values_with_bbox(r, field_id, default_val); + new_vals = _copy_values_with_bbox(r, field_id, default_val); } return new_vals; } -/*---------------------------------------------------------------------------- - * Translate the mapped source mesh. - * - * Caution: cs_medcoupling_remapper_prepare() must to be called after this - * function in order to update the interpolation matrix. +/*----------------------------------------------------------------------------*/ +/*! + * \brief translate the mesh using a given vector * - * parameters: - * r <-- pointer to remapper object - * translation <-- translation vector - *----------------------------------------------------------------------------*/ + * \param[in] r pointer to the cs_medcoupling_remapper_t struct + * \param[in] translation translation vector + */ +/*----------------------------------------------------------------------------*/ void cs_medcoupling_remapper_translate(cs_medcoupling_remapper_t *r, @@ -684,18 +681,16 @@ } } -/*---------------------------------------------------------------------------- - * Rotate the mapped source mesh. - * - * Caution: cs_medcoupling_remapper_prepare() must to be called after this - * function in order to update the interpolation matrix. +/*----------------------------------------------------------------------------*/ +/*! + * \brief Rotate the mesh using a center point, axis and angle * - * parameters: - * r <-- pointer to remapper object - * invariant <-- coordinates of invariant point - * axis <-- rotation axis vector - * angle <-- rotation angle in radians - *----------------------------------------------------------------------------*/ + * \param[in] r pointer to the cs_medcoupling_remapper_t struct + * \param[in] invariant coordinates of the invariant point + * \param[in] axis rotation axis vector + * \param[in] angle rotation angle in radians + */ +/*----------------------------------------------------------------------------*/ void cs_medcoupling_remapper_rotate(cs_medcoupling_remapper_t *r, diff -Nru code-saturne-5.3.1+repack/src/base/cs_parameters_check.c code-saturne-5.3.2+repack/src/base/cs_parameters_check.c --- code-saturne-5.3.1+repack/src/base/cs_parameters_check.c 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/src/base/cs_parameters_check.c 2019-01-29 18:52:54.000000000 +0000 @@ -1084,7 +1084,7 @@ cs_parameters_is_in_range_int(CS_ABORT_DELAYED, _(f_desc), "var_cal_opt.isstpc (limiter type)", - var_cal_opt.relaxv, + var_cal_opt.isstpc, -1, 2); BFT_FREE(f_desc); diff -Nru code-saturne-5.3.1+repack/src/base/ecrlis.f90 code-saturne-5.3.2+repack/src/base/ecrlis.f90 --- code-saturne-5.3.1+repack/src/base/ecrlis.f90 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/src/base/ecrlis.f90 2019-01-29 18:52:54.000000000 +0000 @@ -209,7 +209,7 @@ do c_id = 1, f_dim do icel = 1, ncel - w1(icel) = volume(icel) & + w1(icel) = volume(icel) & * (field_v_v(c_id, icel)-field_v_vp(c_id, icel))/sqrt(dt(icel)) enddo diff -Nru code-saturne-5.3.1+repack/src/base/Makefile.am code-saturne-5.3.2+repack/src/base/Makefile.am --- code-saturne-5.3.1+repack/src/base/Makefile.am 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/src/base/Makefile.am 2019-01-29 18:52:54.000000000 +0000 @@ -4,7 +4,7 @@ # This file is part of Code_Saturne, a general-purpose CFD tool. # -# Copyright (C) 1998-2018 EDF S.A. +# Copyright (C) 1998-2019 EDF S.A. # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software @@ -215,7 +215,6 @@ catsma.f90 \ catsmv.f90 \ catsmt.f90 \ -cdomod.f90 \ clca66.f90 \ clpsca.f90 \ clptrg.f90 \ @@ -387,13 +386,20 @@ lib_LTLIBRARIES = pkglib_LTLIBRARIES = -if HAVE_PARAMEDMEM +if HAVE_MEDCOUPLING pkginclude_HEADERS += \ -cs_paramedmem_coupling.hxx \ -cs_medcoupling_remapper.hxx \ cs_medcoupling_utils.hxx +if HAVE_MEDCOUPLING_LOADER +pkginclude_HEADERS += \ +cs_medcoupling_remapper.hxx +endif + +if HAVE_PARAMEDMEM +pkginclude_HEADERS += cs_paramedmem_coupling.hxx +endif + if HAVE_PLUGIN_MEDCOUPLING cs_paramedmem_la_CPPFLAGS = \ @@ -408,10 +414,19 @@ $(HDF5_CPPFLAGS) \ $(MPI_CPPFLAGS) pkglib_LTLIBRARIES += cs_paramedmem.la + cs_paramedmem_la_SOURCES = \ -cs_paramedmem_coupling.cxx \ -cs_medcoupling_remapper.cxx \ cs_medcoupling_utils.cxx + +if HAVE_MEDCOUPLING_LOADER +cs_paramedmem_la_SOURCES += \ +cs_medcoupling_remapper.cxx +endif + +if HAVE_PARAMEDMEM +cs_paramedmem_la_SOURCES += cs_paramedmem_coupling.cxx +endif + cs_paramedmem_la_LDFLAGS = -module -avoid-version cs_paramedmem_la_LIBADD = \ $(MEDCOUPLING_LDFLAGS) $(MEDCOUPLING_LIBS) \ @@ -430,10 +445,19 @@ $(MED_CPPFLAGS) \ $(HDF5_CPPFLAGS) \ $(MPI_CPPFLAGS) + libcs_paramedmem_la_SOURCES = \ -cs_paramedmem_coupling.cxx \ -cs_medcoupling_remapper.cxx \ cs_medcoupling_utils.cxx + +if HAVE_MEDCOUPLING_LOADER +libcs_paramedmem_la_SOURCES += \ +cs_medcoupling_remapper.cxx +endif + +if HAVE_PARAMEDMEM +libcs_paramedmem_la_SOURCES += cs_paramedmem_coupling.cxx +endif + libcs_paramedmem_la_LIBADD = \ $(MEDCOUPLING_LDFLAGS) $(MEDCOUPLING_LIBS) \ $(MEDCOUPLINGRUNPATH) diff -Nru code-saturne-5.3.1+repack/src/base/post_util.f90 code-saturne-5.3.2+repack/src/base/post_util.f90 --- code-saturne-5.3.1+repack/src/base/post_util.f90 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/src/base/post_util.f90 2019-01-29 18:52:54.000000000 +0000 @@ -185,6 +185,9 @@ do iloc = 1, nfbrps + ifac = lstfbr(iloc) + iel = ifabor(ifac) + if (iscacp(iscalt).eq.1) then if (icp.ge.0) then cpp = cpro_cp(iel) diff -Nru code-saturne-5.3.1+repack/src/base/predvv.f90 code-saturne-5.3.2+repack/src/base/predvv.f90 --- code-saturne-5.3.1+repack/src/base/predvv.f90 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/src/base/predvv.f90 2019-01-29 18:52:54.000000000 +0000 @@ -801,22 +801,24 @@ ! est faite directement dans coditv. if (iterns.eq.1) then - allocate(hl_exp(3, ncelet)) + allocate(hl_exp(3, ncepdp)) call tspdcv(ncepdp, icepdc, vela, ckupdc, hl_exp) ! If PISO-like sub-iterations, we use trava, otherwise trav if(nterup.gt.1) then - do iel = 1, ncel - trava(1,iel) = trava(1,iel) + hl_exp(1,iel) - trava(2,iel) = trava(2,iel) + hl_exp(2,iel) - trava(3,iel) = trava(3,iel) + hl_exp(3,iel) + do ielpdc = 1, ncepdp + iel = icepdc(ielpdc) + trava(1,iel) = trava(1,iel) + hl_exp(1,ielpdc) + trava(2,iel) = trava(2,iel) + hl_exp(2,ielpdc) + trava(3,iel) = trava(3,iel) + hl_exp(3,ielpdc) enddo else - do iel = 1, ncel - trav(1,iel) = trav(1,iel) + hl_exp(1,iel) - trav(2,iel) = trav(2,iel) + hl_exp(2,iel) - trav(3,iel) = trav(3,iel) + hl_exp(3,iel) + do ielpdc = 1, ncepdp + iel = icepdc(ielpdc) + trav(1,iel) = trav(1,iel) + hl_exp(1,ielpdc) + trav(2,iel) = trav(2,iel) + hl_exp(2,ielpdc) + trav(3,iel) = trav(3,iel) + hl_exp(3,ielpdc) enddo endif diff -Nru code-saturne-5.3.1+repack/src/base/tspdcv.f90 code-saturne-5.3.2+repack/src/base/tspdcv.f90 --- code-saturne-5.3.1+repack/src/base/tspdcv.f90 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/src/base/tspdcv.f90 2019-01-29 18:52:54.000000000 +0000 @@ -107,9 +107,9 @@ vit2 = vela(2,iel) vit3 = vela(3,iel) - trav(1,iel) = romvom*(cpdc11*vit1 + cpdc12*vit2 + cpdc13*vit3) - trav(2,iel) = romvom*(cpdc12*vit1 + cpdc22*vit2 + cpdc23*vit3) - trav(3,iel) = romvom*(cpdc13*vit1 + cpdc23*vit2 + cpdc33*vit3) + trav(1,ielpdc) = romvom*(cpdc11*vit1 + cpdc12*vit2 + cpdc13*vit3) + trav(2,ielpdc) = romvom*(cpdc12*vit1 + cpdc22*vit2 + cpdc23*vit3) + trav(3,ielpdc) = romvom*(cpdc13*vit1 + cpdc23*vit2 + cpdc33*vit3) enddo diff -Nru code-saturne-5.3.1+repack/src/base/typecl.f90 code-saturne-5.3.2+repack/src/base/typecl.f90 --- code-saturne-5.3.1+repack/src/base/typecl.f90 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/src/base/typecl.f90 2019-01-29 18:52:54.000000000 +0000 @@ -601,62 +601,6 @@ endif -!=============================================================================== -! 6. Convert to rcodcl and icodcl -! (if this has not already been set by the user) - -! First, process variables for which a specific treatement is done -! (pressure, velocity, ...) -!=============================================================================== - -! 6.1.1 Inlet -! =========== - -! ---> La pression a un traitement Neumann, le reste Dirichlet -! sera traite plus tard. - -ideb = idebty(ientre) -ifin = ifinty(ientre) - -ivar = ipr -do ii = ideb, ifin - ifac = itrifb(ii) - if(icodcl(ifac,ivar).eq.0) then - icodcl(ifac,ivar) = 3 - rcodcl(ifac,ivar,1) = 0.d0 - rcodcl(ifac,ivar,2) = rinfin - rcodcl(ifac,ivar,3) = 0.d0 - endif -enddo - -! 6.1.2 Convective Inlet -! ====================== - -! ---> La pression a un traitement Neumann, le reste Dirichlet -! sera traite plus tard. - -ideb = idebty(i_convective_inlet) -ifin = ifinty(i_convective_inlet) - -ivar = ipr -do ii = ideb, ifin - ifac = itrifb(ii) - if(icodcl(ifac,ivar).eq.0) then - icodcl(ifac,ivar) = 3 - rcodcl(ifac,ivar,1) = 0.d0 - rcodcl(ifac,ivar,2) = rinfin - rcodcl(ifac,ivar,3) = 0.d0 - endif -enddo - - -! 6.2 SORTIE (entree-sortie libre) (ISOLIB) -! =================== - -! ---> La pression a un traitement Dirichlet, les vitesses 9 -! (le reste Neumann, ou Dirichlet si donnee utilisateur, -! sera traite plus tard) - if (iphydr.eq.1.or.iifren.eq.1) then ! En cas de prise en compte de la pression hydrostatique, @@ -832,6 +776,78 @@ endif +!=============================================================================== +! 6. Convert to rcodcl and icodcl +! (if this has not already been set by the user) + +! First, process variables for which a specific treatement is done +! (pressure, velocity, ...) +!=============================================================================== + + +! Translate total pressure P_tot given by the user into solved pressure P +! P = P_tot - p0 - rho0 ( g . (z-z0)) +ivar = ipr +if (ippmod(icompf).lt.0.and.ippmod(idarcy).lt.0) then + do ifac = 1, nfabor + if (icodcl(ifac,ivar).ne.0) then + rcodcl(ifac,ivar,1) = rcodcl(ifac,ivar,1) & + - ro0*( gx*(cdgfbo(1,ifac) - xyzp0(1)) & + + gy*(cdgfbo(2,ifac) - xyzp0(2)) & + + gz*(cdgfbo(3,ifac) - xyzp0(3))) & + - p0 + endif + enddo +endif + +! 6.1.1 Inlet +! =========== + +! ---> La pression a un traitement Neumann, le reste Dirichlet +! sera traite plus tard. + +ideb = idebty(ientre) +ifin = ifinty(ientre) + +ivar = ipr +do ii = ideb, ifin + ifac = itrifb(ii) + if (icodcl(ifac,ivar).eq.0) then + icodcl(ifac,ivar) = 3 + rcodcl(ifac,ivar,1) = 0.d0 + rcodcl(ifac,ivar,2) = rinfin + rcodcl(ifac,ivar,3) = 0.d0 + endif +enddo + +! 6.1.2 Convective Inlet +! ====================== + +! ---> La pression a un traitement Neumann, le reste Dirichlet +! sera traite plus tard. + +ideb = idebty(i_convective_inlet) +ifin = ifinty(i_convective_inlet) + +ivar = ipr +do ii = ideb, ifin + ifac = itrifb(ii) + if (icodcl(ifac,ivar).eq.0) then + icodcl(ifac,ivar) = 3 + rcodcl(ifac,ivar,1) = 0.d0 + rcodcl(ifac,ivar,2) = rinfin + rcodcl(ifac,ivar,3) = 0.d0 + endif +enddo + + +! 6.2 SORTIE (entree-sortie libre) (ISOLIB) +! =================== + +! ---> La pression a un traitement Dirichlet, les vitesses 9 +! (le reste Neumann, ou Dirichlet si donnee utilisateur, +! sera traite plus tard) + ! ---> Entree/Sortie libre ideb = idebty(isolib) @@ -922,7 +938,9 @@ ifac = itrifb(ii) if(icodcl(ifac,ivar).eq.0) then icodcl(ifac,ivar) = 1 - rcodcl(ifac,ivar,1) = p0 + rcodcl(ifac,ivar,1) = - ro0*( gx*(cdgfbo(1,ifac) - xyzp0(1)) & + + gy*(cdgfbo(2,ifac) - xyzp0(2)) & + + gz*(cdgfbo(3,ifac) - xyzp0(3))) rcodcl(ifac,ivar,2) = rinfin rcodcl(ifac,ivar,3) = 0.d0 endif @@ -1050,7 +1068,7 @@ elseif(ivar.eq.ipr) then do ii = ideb, ifin ifac = itrifb(ii) - if(icodcl(ifac,ivar).eq.0) then + if (icodcl(ifac,ivar).eq.0) then icodcl(ifac,ivar) = 3 rcodcl(ifac,ivar,1) = 0.d0 rcodcl(ifac,ivar,2) = rinfin @@ -1445,7 +1463,7 @@ do ivar = 1, nvar do ii = ideb, ifin ifac = itrifb(ii) - if(icodcl(ifac,ivar).eq.0) then + if (icodcl(ifac,ivar).eq.0) then if (rcodcl(ifac,ivar,1).gt.rinfin*0.5d0) then icodcl(ifac,ivar) = 3 diff -Nru code-saturne-5.3.1+repack/src/fvm/fvm_to_melissa.c code-saturne-5.3.2+repack/src/fvm/fvm_to_melissa.c --- code-saturne-5.3.1+repack/src/fvm/fvm_to_melissa.c 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/src/fvm/fvm_to_melissa.c 2019-01-29 18:52:54.000000000 +0000 @@ -6,7 +6,7 @@ /* This file is part of Code_Saturne, a general-purpose CFD tool. - Copyright (C) 1998-2018 EDF S.A. + Copyright (C) 1998-2019 EDF S.A. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -171,16 +171,11 @@ if (c->writer->time_stamp > 0) { #if defined(HAVE_MPI) - melissa_send(&(c->writer->time_stamp), - c->name, - values, - &c->writer->rank, - &c->writer->simu_id); + melissa_send(c->name, + values); #else - melissa_send_no_mpi(&(c->writer->time_stamp), - c->name, - values, - &c->writer->simu_id); + melissa_send_no_mpi(c->name, + values); #endif } } @@ -234,11 +229,8 @@ } if (c->writer->time_stamp > 0) { - melissa_send(&(c->writer->time_stamp), - c->name, - buffer, - &c->writer->rank, - &c->writer->simu_id); + melissa_send(c->name, + buffer); } } diff -Nru code-saturne-5.3.1+repack/src/lagr/cs_lagr_adh.c code-saturne-5.3.2+repack/src/lagr/cs_lagr_adh.c --- code-saturne-5.3.1+repack/src/lagr/cs_lagr_adh.c 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/src/lagr/cs_lagr_adh.c 2019-01-29 18:52:54.000000000 +0000 @@ -592,7 +592,7 @@ cs_lagr_particle_set_real(part, p_am, CS_LAGR_ADHESION_FORCE, 0.0); else - cs_lagr_particle_set_real(p_set, p_am, CS_LAGR_ADHESION_FORCE, -fadhes); + cs_lagr_particle_set_real(part, p_am, CS_LAGR_ADHESION_FORCE, -fadhes); /* The interaction should be negative to prevent reentrainment (attraction) */ if (*adhesion_energ >= 0.0) diff -Nru code-saturne-5.3.1+repack/src/lagr/cs_lagr.c code-saturne-5.3.2+repack/src/lagr/cs_lagr.c --- code-saturne-5.3.1+repack/src/lagr/cs_lagr.c 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/src/lagr/cs_lagr.c 2019-01-29 18:52:54.000000000 +0000 @@ -2173,6 +2173,9 @@ } /* end if number of particles > 0 */ + else if (cs_glob_time_step->nt_cur >= cs_glob_lagr_stat_options->idstnt) + cs_lagr_stat_update(); + /* Optional user modification of Lagrangian variables at end of iteration */ cs_user_lagr_extra_operations(dt); diff -Nru code-saturne-5.3.1+repack/src/lagr/cs_lagr_resuspension.c code-saturne-5.3.2+repack/src/lagr/cs_lagr_resuspension.c --- code-saturne-5.3.1+repack/src/lagr/cs_lagr_resuspension.c 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/src/lagr/cs_lagr_resuspension.c 2019-01-29 18:52:54.000000000 +0000 @@ -217,8 +217,9 @@ } /* Monolayer resuspension model */ - if (face_id > 0 && - bound_stat[face_id + n_faces * lag_bi->ihdepm] < diam_mean ) { + if (( cs_glob_lagr_model->clogging == 0 && face_id > 0) + || ( cs_glob_lagr_model->clogging == 1 && face_id > 0 + && bound_stat[face_id + n_faces * lag_bi->ihdepm] < diam_mean)) { if (flag == CS_LAGR_PART_DEPOSITED) /* The particle has just deposited */ @@ -384,7 +385,8 @@ } } /* Enf of monolayer resuspension */ - else { + else if ( cs_glob_lagr_model->clogging == 1 + && bound_stat[face_id + n_faces * lag_bi->ihdepm] >= diam_mean) { /* Treatment of multilayer resuspension */ diff -Nru code-saturne-5.3.1+repack/src/lagr/cs_lagr_sde.c code-saturne-5.3.2+repack/src/lagr/cs_lagr_sde.c --- code-saturne-5.3.1+repack/src/lagr/cs_lagr_sde.c 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/src/lagr/cs_lagr_sde.c 2019-01-29 18:52:54.000000000 +0000 @@ -1139,7 +1139,7 @@ } - if (cs_glob_lagr_reentrained_model->ireent == 1) { + if (cs_glob_lagr_model->resuspension == 1) { cs_real_t p_height = cs_lagr_particle_get_real(particle, p_am, CS_LAGR_HEIGHT); @@ -1160,8 +1160,11 @@ * (another possibility is to use the jamming limit...) */ cs_real_t diam_mean = cs_glob_lagr_clogging_model->diam_mean; - if (bound_stat[n_f_id + nfabor * cs_glob_lagr_boundary_interactions->ihdepm] < - diam_mean && iresusp == 0) { + if ( (cs_glob_lagr_model->clogging == 0 && iresusp == 0) + || ( cs_glob_lagr_model->clogging == 1 + && bound_stat[n_f_id + nfabor * cs_glob_lagr_boundary_interactions->ihdepm] + < diam_mean && iresusp == 0)) { + /* Monolayer resuspension */ /* Calculation of the hydrodynamic drag and torque @@ -1191,8 +1194,8 @@ } /* Calculation of gravity force and torque */ - for (cs_lnum_t id = 1; id < 3; id++) { - grav_force[id] = p_diam * ggp[id]; + for (cs_lnum_t id = 0; id < 3; id++) { + grav_force[id] = 4./3. * cs_math_pi * cs_math_pow3(p_diam/2) * romp * ggp[id]; } for (cs_lnum_t id = 1; id < 3; id++) { @@ -1275,8 +1278,7 @@ /* The particle is resuspended */ vpart[0] = CS_MIN(-1.0 / p_mass * dtp - * CS_ABS(-lift_force[0] - drag_force[0] - - adhes_force -grav_force[0] ), + * CS_ABS(drag_force[0] - adhes_force), 0.001); if ( cs_lagr_particle_get_lnum(particle, p_am, CS_LAGR_DEPOSITION_FLAG) == CS_LAGR_PART_DEPOSITED ){ @@ -1288,10 +1290,12 @@ cs_lagr_particle_set_real(particle, p_am, CS_LAGR_ADHESION_FORCE, 0.0); cs_lagr_particle_set_real(particle, p_am, CS_LAGR_ADHESION_TORQUE, 0.0); - if (CS_ABS(p_height-p_diam)/p_diam > 1.0e-6) { - cs_real_t d_resusp = pow(0.75 * pow(p_diam,2) * p_height, 1.0/3.0); - cs_lagr_particle_set_real(particle, p_am, CS_LAGR_DIAMETER, d_resusp); - cs_lagr_particle_set_real(particle, p_am, CS_LAGR_HEIGHT, d_resusp); + if (cs_glob_lagr_model->clogging == 1) { + if (CS_ABS(p_height-p_diam)/p_diam > 1.0e-6) { + cs_real_t d_resusp = pow(0.75 * pow(p_diam,2) * p_height, 1.0/3.0); + cs_lagr_particle_set_real(particle, p_am, CS_LAGR_DIAMETER, d_resusp); + cs_lagr_particle_set_real(particle, p_am, CS_LAGR_HEIGHT, d_resusp); + } } if (p_am->count[0][CS_LAGR_N_LARGE_ASPERITIES] > 0) @@ -1416,8 +1420,11 @@ } /* End of monolayer resuspension*/ - else if (bound_stat[n_f_id + nfabor * cs_glob_lagr_boundary_interactions->ihdepm] - >= diam_mean && iresusp ==0) { + else if ( cs_glob_lagr_model->clogging == 1 + && bound_stat[n_f_id + nfabor * cs_glob_lagr_boundary_interactions->ihdepm] + >= diam_mean + && iresusp == 0) { + /* Multilayer resuspension model */ cs_real_t mean_depo_height diff -Nru code-saturne-5.3.1+repack/src/lagr/cs_lagr_stat.c code-saturne-5.3.2+repack/src/lagr/cs_lagr_stat.c --- code-saturne-5.3.1+repack/src/lagr/cs_lagr_stat.c 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/src/lagr/cs_lagr_stat.c 2019-01-29 18:52:54.000000000 +0000 @@ -1013,8 +1013,12 @@ { const cs_time_step_t *ts = cs_glob_time_step; - if (ts->nt_prev < 1 || !cs_file_isreg("restart/lagrangian_stats")) + if ( ts->nt_prev < 1 + || !cs_file_isreg("restart/lagrangian_stats") + || cs_glob_lagr_stat_options->isuist < 1) { + _restart_info_checked = true; return; + } cs_restart_t *r = NULL; diff -Nru code-saturne-5.3.1+repack/src/lagr/cs_lagr_tracking.c code-saturne-5.3.2+repack/src/lagr/cs_lagr_tracking.c --- code-saturne-5.3.1+repack/src/lagr/cs_lagr_tracking.c 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/src/lagr/cs_lagr_tracking.c 2019-01-29 18:52:54.000000000 +0000 @@ -1226,8 +1226,9 @@ p_am, CS_LAGR_CELL_NUM); - cs_lagr_particle_set_lnum(particle, p_am, CS_LAGR_DEPOSITION_FLAG, - CS_LAGR_PART_DEPOSITED); + if (cs_glob_lagr_model->deposition == 1) + cs_lagr_particle_set_lnum(particle, p_am, CS_LAGR_DEPOSITION_FLAG, + CS_LAGR_PART_DEPOSITED); if (cs_glob_lagr_model->resuspension == 0) { diff -Nru code-saturne-5.3.1+repack/src/Makefile.am code-saturne-5.3.2+repack/src/Makefile.am --- code-saturne-5.3.1+repack/src/Makefile.am 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/src/Makefile.am 2019-01-29 18:52:54.000000000 +0000 @@ -55,6 +55,7 @@ base/albase.f90 \ base/alstru.f90 \ base/cavitation.f90 \ +base/cdomod.f90 \ base/cplsat.f90 \ base/cstphy.f90 \ base/cstnum.f90 \ diff -Nru code-saturne-5.3.1+repack/src/turb/cs_turbulence_bc.c code-saturne-5.3.2+repack/src/turb/cs_turbulence_bc.c --- code-saturne-5.3.1+repack/src/turb/cs_turbulence_bc.c 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/src/turb/cs_turbulence_bc.c 2019-01-29 18:52:54.000000000 +0000 @@ -187,6 +187,12 @@ double eps, double *rcodcl); +void +cs_f_turbulence_bc_set_uninit_inlet_k_eps(cs_lnum_t face_num, + double k, + double eps, + double *rcodcl); + /*============================================================================ * Private function definitions *============================================================================*/ @@ -324,6 +330,103 @@ if (cs_glob_turb_model->itytur == 2) { + rcodcl[_turb_bc_id.k *n_b_faces + face_id] = k; + rcodcl[_turb_bc_id.eps*n_b_faces + face_id] = eps; + + } + + else if (cs_glob_turb_model->itytur == 3) { + + double d2s3 = 2./3.; + if (_turb_bc_id.rij == -1) { + rcodcl[_turb_bc_id.r11*n_b_faces + face_id] = d2s3 * k; + rcodcl[_turb_bc_id.r22*n_b_faces + face_id] = d2s3 * k; + rcodcl[_turb_bc_id.r33*n_b_faces + face_id] = d2s3 * k; + rcodcl[_turb_bc_id.r12*n_b_faces + face_id] = 0.; + rcodcl[_turb_bc_id.r13*n_b_faces + face_id] = 0.; + rcodcl[_turb_bc_id.r23*n_b_faces + face_id] = 0.; + rcodcl[_turb_bc_id.eps*n_b_faces + face_id] = eps; + } + else { + rcodcl[_turb_bc_id.rij*n_b_faces + face_id] = d2s3 * k; + rcodcl[(_turb_bc_id.rij + 1)*n_b_faces + face_id] = d2s3 * k; + rcodcl[(_turb_bc_id.rij + 2)*n_b_faces + face_id] = d2s3 * k; + rcodcl[(_turb_bc_id.rij + 3)*n_b_faces + face_id] = 0.; + rcodcl[(_turb_bc_id.rij + 4)*n_b_faces + face_id] = 0.; + rcodcl[(_turb_bc_id.rij + 5)*n_b_faces + face_id] = 0.; + rcodcl[_turb_bc_id.eps*n_b_faces + face_id] = eps; + } + + if (cs_glob_turb_model->iturb == 32) + rcodcl[_turb_bc_id.alpha*n_b_faces + face_id] = 1.; + + /* Initialization of the turbulent fluxes to 0 if DFM or + * EB-DFM are used for scalars (iturt = 30 or 31) + * Alpha_theta for EB-DFM / EB-AFM / EB-GGDH is + * initialize to 1 */ + + if (_turb_bc_id.size_ut > 0) { + for (int var_id = 0; var_id < _turb_bc_id.size_ut; var_id++) { + rcodcl[_turb_bc_id.ut[var_id]*n_b_faces + face_id] = 0.; + rcodcl[(_turb_bc_id.ut[var_id]+1)*n_b_faces + face_id] = 0.; + rcodcl[(_turb_bc_id.ut[var_id]+2)*n_b_faces + face_id] = 0.; + } + } + + if (_turb_bc_id.size_alpha_t > 0) { + for (int var_id = 0; var_id < _turb_bc_id.size_alpha_t; var_id++) { + rcodcl[_turb_bc_id.alpha_t[var_id]*n_b_faces + face_id] = 1.; + } + } + + } + else if (cs_glob_turb_model->itytur == 5) { + + rcodcl[_turb_bc_id.k *n_b_faces + face_id] = k; + rcodcl[_turb_bc_id.eps*n_b_faces + face_id] = eps; + + rcodcl[_turb_bc_id.phi*n_b_faces + face_id] = 2./3.; + if (cs_glob_turb_model->iturb == 50) { + rcodcl[_turb_bc_id.f_bar*n_b_faces + face_id] = 0.; + } + else if (cs_glob_turb_model->iturb == 51) { + rcodcl[_turb_bc_id.alpha*n_b_faces + face_id] = 0.; + } + + } + else if (cs_glob_turb_model->itytur == 6) { + + rcodcl[_turb_bc_id.k *n_b_faces + face_id] = k; + rcodcl[_turb_bc_id.omg*n_b_faces + face_id] = eps/cs_turb_cmu/k; + + } + else if (cs_glob_turb_model->itytur == 7) { + + rcodcl[_turb_bc_id.nusa*n_b_faces + face_id] = cs_turb_cmu*k*k/eps; + + } +} + +/*----------------------------------------------------------------------------* + * Assign turbulent boundary condition to a given face only if unitialized. + * + * parameters: + * face_id <-- face id + * k <-- k + * eps <-- epsilon + * rcodcl <-> boundary condition values + *----------------------------------------------------------------------------*/ + +static inline void +_set_uninit_inlet_bc(cs_lnum_t face_id, + double k, + double eps, + double *rcodcl) +{ + const cs_lnum_t n_b_faces = cs_glob_mesh->n_b_faces; + + if (cs_glob_turb_model->itytur == 2) { + if (rcodcl[_turb_bc_id.k *n_b_faces + face_id] > 0.5*cs_math_infinite_r) rcodcl[_turb_bc_id.k *n_b_faces + face_id] = k; @@ -494,9 +597,8 @@ * * parameters: * face_num <-- face number - * uref2 <-- square of the reference flow velocity - * t_intensity <-- turbulence intensity - * dh <-- hydraulic diameter \f$ D_H \f$ + * k <-- turbulent kinetic energy + * eps <-- turbulent dissipation * rcodcl <-> boundary condition values *----------------------------------------------------------------------------*/ @@ -509,6 +611,26 @@ _inlet_bc(face_num - 1, k, eps, rcodcl); } +/*---------------------------------------------------------------------------- + * Equivalent of cs_turbulence_bc_set_uninit_inlet_ke for Fortran calls + * (using 1-based face number instead of id). + * + * parameters: + * face_num <-- face number + * k <-- turbulent kinetic energy + * eps <-- turbulent dissipation + * rcodcl <-> boundary condition values + *----------------------------------------------------------------------------*/ + +void +cs_f_turbulence_bc_set_uninit_inlet_k_eps(cs_lnum_t face_num, + double k, + double eps, + double *rcodcl) +{ + _set_uninit_inlet_bc(face_num - 1, k, eps, rcodcl); +} + /*! (DOXYGEN_SHOULD_SKIP_THIS) \endcond */ /*============================================================================= @@ -633,6 +755,7 @@ if (_turb_bc_id.size_alpha_t > 0) BFT_FREE( _turb_bc_id.alpha_t); } + /*----------------------------------------------------------------------------*/ /*! * \brief Calculation of \f$ u^\star \f$, \f$ k \f$ and \f$\varepsilon \f$ @@ -800,5 +923,47 @@ } /*----------------------------------------------------------------------------*/ +/*! + * \brief Set inlet boundary condition values for turbulence variables based + * on given k and epsilon values. + * + * \param[in] face_id boundary face id + * \param[in] k turbulent kinetic energy + * \param[in] eps turbulent dissipation + * \param[out] rcodcl boundary condition values + */ +/*----------------------------------------------------------------------------*/ + +void +cs_turbulence_bc_inlet_k_eps(cs_lnum_t face_id, + double k, + double eps, + double *rcodcl) +{ + _inlet_bc(face_id, k, eps, rcodcl); +} + +/*----------------------------------------------------------------------------*/ +/*! + * \brief Set inlet boundary condition values for turbulence variables based + * on given k and epsilon values only if not already initialized. + * + * \param[in] face_id boundary face id + * \param[in] k turbulent kinetic energy + * \param[in] eps turbulent dissipation + * \param[out] rcodcl boundary condition values + */ +/*----------------------------------------------------------------------------*/ + +void +cs_turbulence_bc_set_uninit_inlet_k_eps(cs_lnum_t face_id, + double k, + double eps, + double *rcodcl) +{ + _set_uninit_inlet_bc(face_id, k, eps, rcodcl); +} + +/*----------------------------------------------------------------------------*/ END_C_DECLS diff -Nru code-saturne-5.3.1+repack/src/turb/cs_turbulence_bc.h code-saturne-5.3.2+repack/src/turb/cs_turbulence_bc.h --- code-saturne-5.3.1+repack/src/turb/cs_turbulence_bc.h 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/src/turb/cs_turbulence_bc.h 2019-01-29 18:52:54.000000000 +0000 @@ -219,6 +219,42 @@ double *rcodcl); /*----------------------------------------------------------------------------*/ +/*! + * \brief Set inlet boundary condition values for turbulence variables based + * on given k and epsilon values. + * + * \param[in] face_id boundary face id + * \param[in] k turbulent kinetic energy + * \param[in] eps turbulent dissipation + * \param[out] rcodcl boundary condition values + */ +/*----------------------------------------------------------------------------*/ + +void +cs_turbulence_bc_inlet_k_eps(cs_lnum_t face_id, + double k, + double eps, + double *rcodcl); + +/*----------------------------------------------------------------------------*/ +/*! + * \brief Set inlet boundary condition values for turbulence variables based + * on given k and epsilon values only if not already initialized. + * + * \param[in] face_id boundary face id + * \param[in] k turbulent kinetic energy + * \param[in] eps turbulent dissipation + * \param[out] rcodcl boundary condition values + */ +/*----------------------------------------------------------------------------*/ + +void +cs_turbulence_bc_set_uninit_inlet_k_eps(cs_lnum_t face_id, + double k, + double eps, + double *rcodcl); + +/*----------------------------------------------------------------------------*/ END_C_DECLS diff -Nru code-saturne-5.3.1+repack/src/user_examples/cs_user_boundary_conditions-cooling_towers.f90 code-saturne-5.3.2+repack/src/user_examples/cs_user_boundary_conditions-cooling_towers.f90 --- code-saturne-5.3.1+repack/src/user_examples/cs_user_boundary_conditions-cooling_towers.f90 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/src/user_examples/cs_user_boundary_conditions-cooling_towers.f90 2019-01-29 18:52:54.000000000 +0000 @@ -165,6 +165,8 @@ itypfb(ifac) = isolib ! Precribe a pressure profile for all faces + ! Warning: the pressure has to be specified in term of TOTAL pressure + ! i.e. including ro0.g.z... icodcl(ifac,ipr) = 1 rcodcl(ifac,ipr,1) = & ro0*( gx*(cdgfbo(1,ifac)-xyzp0(1)) & diff -Nru code-saturne-5.3.1+repack/src/user_examples/cs_user_lagr_particle.c code-saturne-5.3.2+repack/src/user_examples/cs_user_lagr_particle.c --- code-saturne-5.3.1+repack/src/user_examples/cs_user_lagr_particle.c 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/src/user_examples/cs_user_lagr_particle.c 2019-01-29 18:52:54.000000000 +0000 @@ -412,7 +412,7 @@ for (int attr_id = CS_LAGR_USER; attr_id < CS_LAGR_USER + cs_glob_lagr_model->n_user_variables; attr_id++) { - cs_real_t *user_var = cs_lagr_particle_attr(particles, p_id, attr_id); + cs_real_t *user_var = cs_lagr_particles_attr(particles, p_id, attr_id); *user_var = 0.; } diff -Nru code-saturne-5.3.1+repack/src/user_examples/Makefile.am code-saturne-5.3.2+repack/src/user_examples/Makefile.am --- code-saturne-5.3.1+repack/src/user_examples/Makefile.am 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/src/user_examples/Makefile.am 2019-01-29 18:52:54.000000000 +0000 @@ -187,7 +187,7 @@ example_DATA = $(examplefiles) clean-local: - -rm -f *__genmod.f90 *__genmod.mod + -rm -f *__genmod.f90 *.mod # Finish example files installation # - tag with the package version number diff -Nru code-saturne-5.3.1+repack/tests/Makefile.am code-saturne-5.3.2+repack/tests/Makefile.am --- code-saturne-5.3.1+repack/tests/Makefile.am 2018-11-21 10:59:24.000000000 +0000 +++ code-saturne-5.3.2+repack/tests/Makefile.am 2019-01-29 18:52:54.000000000 +0000 @@ -119,10 +119,10 @@ cs_map_test \ cs_matrix_test \ cs_moment_test \ +cs_random_test \ cs_rank_neighbors_test \ fvm_selector_test \ fvm_selector_postfix_test \ -cs_random_test \ cs_sizes_test \ cs_tree_test @@ -234,6 +234,3 @@ EXTRA_DIST = \ unittests.py \ $(top_srcdir)/tests/graphics - -dist-hook: - rm -rf `find $(distdir)/tests/graphics -type d -name .svn`