diff --git a/dart/api/core.py b/dart/api/core.py index 3dd8799ea100c9ed0e199d92a3973ea072b226d7..4bd4eba909ed11ef2b6330e6ef27f4935ebf14f2 100644 --- a/dart/api/core.py +++ b/dart/api/core.py @@ -155,7 +155,7 @@ def initDart(cfg, scenario='aerodynamic', task='analysis', viscous=False): # Mesh morpher creation if scenario == 'aerostructural' or task == 'optimization': - _mrf = tbox.MshDeform(_msh, tbox.Gmres(1, 1e-6, 30, 1e-8), _dim, nthrds=nthrd, vrb=verb) + _mrf = tbox.MshDeform(_msh, tbox.Gmres(2, 1e-6, 50, 1e-8, 500), _dim, nthrds=nthrd, vrb=verb) _mrf.setField(cfg['Fluid']) for tag in cfg['Farfield']: _mrf.addFixed(tag) diff --git a/dart/src/wNewton.cpp b/dart/src/wNewton.cpp index 91ac0a2d6e5a1d24f5f27426a6996bb7915c048f..7943ae52b1d31bf04a4a8e02502d0de05ab97e3c 100644 --- a/dart/src/wNewton.cpp +++ b/dart/src/wNewton.cpp @@ -243,7 +243,7 @@ STATUS Newton::run() if (relRes < relTol || absRes < absTol) { if (verbose > 0) - std::cout << ANSI_COLOR_GREEN << "Newton solver converged!" << ANSI_COLOR_RESET << std::endl; + std::cout << ANSI_COLOR_GREEN << "Newton solver converged." << ANSI_COLOR_RESET << std::endl; if (verbose > 2) std::cout << "Newton solver CPU" << std::endl << tms; @@ -265,7 +265,7 @@ STATUS Newton::run() else { if (verbose > 0) - std::cout << ANSI_COLOR_YELLOW << "Newton solver not fully converged!" << ANSI_COLOR_RESET << std::endl; + std::cout << ANSI_COLOR_YELLOW << "Newton solver not fully converged." << ANSI_COLOR_RESET << std::endl; if (verbose > 2) std::cout << "Newton solver CPU" << std::endl << tms; diff --git a/dart/src/wPicard.cpp b/dart/src/wPicard.cpp index 15177ebcb14e46fec7581fafc6daf94ae00b2bd7..537f1272fc0e354cf8e0a7fbe3ee37d34fbe6b5a 100644 --- a/dart/src/wPicard.cpp +++ b/dart/src/wPicard.cpp @@ -171,7 +171,7 @@ STATUS Picard::run() if (relRes < relTol || absRes < absTol) { if (verbose > 0) - std::cout << ANSI_COLOR_GREEN << "Picard solver converged!" << ANSI_COLOR_RESET << std::endl; + std::cout << ANSI_COLOR_GREEN << "Picard solver converged." << ANSI_COLOR_RESET << std::endl; if (verbose > 2) std::cout << "Picard solver CPU" << std::endl << tms; @@ -193,7 +193,7 @@ STATUS Picard::run() else { if (verbose > 0) - std::cout << ANSI_COLOR_YELLOW << "Picard solver not fully converged!" << ANSI_COLOR_RESET << std::endl; + std::cout << ANSI_COLOR_YELLOW << "Picard solver not fully converged." << ANSI_COLOR_RESET << std::endl; if (verbose > 2) std::cout << "Picard solver CPU" << std::endl << tms; diff --git a/dart/src/wSolver.cpp b/dart/src/wSolver.cpp index 32e8c70175ff8009f1450cf65714685ab0d8902c..2c2d60c8db50fa713d8f951dca4d3ab51e700747 100644 --- a/dart/src/wSolver.cpp +++ b/dart/src/wSolver.cpp @@ -64,7 +64,7 @@ Solver::Solver(std::shared_ptr<Problem> _pbl, << "** _ /_/ /_ ___ | __ _/_ / **\n" << "** /_____/ /_/ |_/_/ |_| /_/ **\n" << "*******************************************************************************\n" - << "** Hi! My name is DART v1.2.0-22.04 **\n" + << "** Hi! My name is DART v1.2.0-22.10 **\n" << "** Adrien Crovato **\n" << "** ULiege 2018-2022 **\n" << "*******************************************************************************\n" @@ -274,6 +274,6 @@ void Solver::computeFlow() }); // Check maximum Mach number - if (*std::max_element(M.begin(), M.end()) >= 1.25 && verbose > 0) - std::cout << ANSI_COLOR_YELLOW << "Max. Mach greater than 1.25!" << ANSI_COLOR_RESET << std::endl; + if (*std::max_element(M.begin(), M.end()) >= 1.3 && verbose > 0) + std::cout << ANSI_COLOR_YELLOW << "Max. Mach greater than 1.3." << ANSI_COLOR_RESET << std::endl; } diff --git a/dart/validation/crm.py b/dart/validation/crm.py index c70fd7ab4a25cc373746795d069d43c1a0637968..c773d86be459ed70c12b6d9ff6a946faf1065456 100644 --- a/dart/validation/crm.py +++ b/dart/validation/crm.py @@ -75,7 +75,7 @@ def cfg(): 'z_ref' : 4.520, # z-coordinate of reference point for moment computation # Numerical 'LSolver' : 'GMRES', # inner solver (PARDISO, MUMPS or GMRES) - 'G_fill' : 2, # fill-in factor for GMRES preconditioner (optional, default=2) + 'G_fill' : 3, # fill-in factor for GMRES preconditioner (optional, default=2) 'G_tol' : 1e-5, # tolerance for GMRES (optional, default=1e-5) 'G_restart' : 50, # restart for GMRES (optional, default=50) 'Rel_tol' : 1e-6, # relative tolerance on solver residual diff --git a/vii/CMakeLists.txt b/vii/CMakeLists.txt index 62fe065be3399f318baa6d8eb40670e967473aca..fba4e43173be7839ed2a1194f00839f98c94dbd2 100644 --- a/vii/CMakeLists.txt +++ b/vii/CMakeLists.txt @@ -21,6 +21,7 @@ MACRO_AddTest(${CMAKE_CURRENT_SOURCE_DIR}/tests) # Add to install INSTALL(FILES ${CMAKE_CURRENT_LIST_DIR}/__init__.py + ${CMAKE_CURRENT_LIST_DIR}/coupler.py ${CMAKE_CURRENT_LIST_DIR}/utils.py DESTINATION vii) INSTALL(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/api diff --git a/vii/tests/bli2D.py b/vii/tests/bli2D.py index c7938061f20e900388e969d1a3ee58e5065ff35a..e661a8bce411c6bae438d0b8c2a8d154f77e7d60 100644 --- a/vii/tests/bli2D.py +++ b/vii/tests/bli2D.py @@ -102,6 +102,10 @@ def main(): print('SOLVERS statistics') print(Coupler.tms) + # Plot results. + tboxU.plot(Cp[:,0], Cp[:,3], {'xlabel': 'x', 'ylabel': 'Cp', 'title': 'Cl = {0:.{3}f}, Cd = {1:.{3}f}, Cm = {2:.{3}f}'.format(iSolverAPI.getCl(), vSolver.Cdt, iSolverAPI.getCm(), 4), 'invert': True}) + tboxU.plot(vSolution['x/c'], vSolution['Cf'], {'xlabel': '$x/c$', 'ylabel': '$c_f$', 'title': 'Cdt = {0:.{3}f}, Cdf = {1:.{3}f}, Cdp = {2:.{3}f}'.format(vSolver.Cdt, vSolver.Cdf, vSolver.Cdp, 4), 'xlim': [0, 1]}) + # Check results. # Test for n0012 (le=0.01, te=0.01), alpha=2, M=.2, Re=1e7. print(ccolors.ANSI_BLUE + 'PyTesting...' + ccolors.ANSI_RESET) @@ -113,10 +117,7 @@ def main(): tests.add(CTest('xtr_bot', vSolution['xtrB'], 0.50, 0.03, forceabs=True)) # XFOIL 0.4998 tests.run() - # Plot results - tboxU.plot(Cp[:,0], Cp[:,3], {'xlabel': 'x', 'ylabel': 'Cp', 'title': 'Cl = {0:.{3}f}, Cd = {1:.{3}f}, Cm = {2:.{3}f}'.format(iSolverAPI.getCl(), vSolver.Cdt, iSolverAPI.getCm(), 4), 'invert': True}) - tboxU.plot(vSolution['x/c'], vSolution['Cf'], {'xlabel': '$x/c$', 'ylabel': '$c_f$', 'title': 'Cdt = {0:.{3}f}, Cdf = {1:.{3}f}, Cdp = {2:.{3}f}'.format(vSolver.Cdt, vSolver.Cdf, vSolver.Cdp, 4), 'xlim': [0, 1]}) - # eof. + # eof print('') if __name__ == "__main__":