Jump to content

英文维基 | 中文维基 | 日文维基 | 草榴社区

Draft:preCICE (software)

From Wikipedia, the free encyclopedia
preCICE
Developer(s)University of Stuttgart, Technical University of Munich, and the preCICE community
Initial releaseJune 1, 2010; 14 years ago (2010-06-01)[1]
Stable release
3.1.2[2] Edit this on Wikidata / 6 June 2024
Repository
Written inC++
Operating systemLinux, macOS, Windows[3],FreeBSD[4]
PredecessorFSI*ce[5]
Available inEnglish
Typesimulation software, multiphysics simulation, multiscale simulation
LicenseLGPL-3.0-or-later
Websiteprecice.org Edit this on Wikidata

preCICE is a free/open-source coupling library for partitioned multi-physics simulations, including but not restricted to fluid-structure interaction, conjugate heat transfer, and more. preCICE is not specific to particular applications or tools, but instead couples independent, existing codes capable of simulating a subpart of the complete physics involved in a simulation.

To create a coupled simulation, a user would modify existing simulation codes to add calls to the preCICE API (or use one of the provided adapters), provide a preCICE configuration file, and start each code normally, e.g., in a separate terminal.

Overview of the preCICE coupling library (as of 2024), including the main concepts, features, and examples of codes already coupled.

History

[edit]

Early years

[edit]

The name "preCICE" (precise code interaction coupling environment) appears in literature first in 2010[1]. preCICE is a direct successor of FSI*ce, developed at the Technical University of Munich, which mainly targeted fluid-structure interaction simulations[5]. FSI*ce was a result of a German Research Foundation project in the Research Group FOR493.

preCICE v1

[edit]

In May 2015, the development of preCICE was moved to its own organization on GitHub. The first stable version of the core library was released in November 2017 (v1.0.0).

preCICE v1 included a variety of coupling schemes (explicit and implicit, Aitken underrelaxation, Anderson and Broyden quasi-Newton acceleration algorithms), data mapping methods (nearest-neighbor, nearest-projection, RBF), and communication methods (TCP/IP sockets, MPI ports)[6].

The v1.x release cycle saw releases until v1.6.1, in September 2019.

preCICE v2

[edit]

By 2020, the preCICE project saw development in different directions: extensive refactoring and testing of the core library, large expansion of the available documentation, development of several new adapters and several community building measures[7]. Several of these changes are connected to the acceptance of preCICE into the extreme-scale scientific software development kit (xSDK)[8]. Due to increased number of components, the preCICE distribution was introduced as a citable bundle of components working together.

The v2.x release cycle saw releases until v2.5.1, in January 2024.

preCICE v3

[edit]

preCICE v3.0.0 was released in February 2024. Notable changes of v3 include simplifications in the API and configuration, multirate and higher-order time stepping[9], and faster RBF mapping based on a partition of unity approach.

At the time of the v3 release cycle, the project has expanded from targeting mainly surface coupling to also targeting volume coupling (overlapping domains, see domain decomposition methods), geometric multiscale mapping, system codes implementing the Functional Mock-up Interface[10], and multiscale simulations[11].

API

[edit]

The native API of preCICE is written in C++. Language bindings for C and Fortran are compiled into the preCICE library itself. Further language bindings are available externally.

Language Repository License Package Usage (v3)
C++ precice on GitHub LGPL-3.0-or-later GitHub Releases
#include <precice/precice.hpp>
precice::Participant p();
C
#include <precice/preciceC.h>
preciceC_createParticipant();
Fortran
CALL precicef_create()
Fortran Module fortran-module on GitHub LGPL-3.0-or-later
use precice
CALL precicef_create()
Python python-bindings on GitHub LGPL-3.0-or-later PyPi
import precice
p = precice.Participant()
Rust rust-bindings on GitHub LGPL-3.0-or-later crates.io
use precice
let mut participant = precice::Participant::new();
Julia PreCICE.jl on GitHub LGPL-3.0-or-later
using PreCICE
PreCICE.createParticipant()
Matlab matlab-bindings on GitHub LGPL-3.0-or-later
p = precice.Participant()

Configuration

[edit]

The individual coupled codes (coupling participants) share a common XML-based configuration file, which specifies the data and coupling meshes, the communication, coupling scheme, acceleration method, and more at runtime. Using a different coupling scheme does not require any changes to the code calling preCICE, but only to the configuration file[6].

The coupled codes often group the preCICE API calls into an adapter code. This adapter is typically configured by a separate configuration file (with a format appropriate for the respective simulation code), and specifies the exact region of the simulation domain to be coupled, as well as the exact data exchanged.[7].

Example

[edit]

An adapted fluid solver written in Python using preCICE v3 (ported from v2 reference paper[7]). While this example is inspired from fluid-structure interaction (exchanging forces and displacements), the model, solution fields, and the exchanged fields can be arbitrary.

import precice

participant = precice.Participant("Fluid", "../precice-config.xml", 0, 1)

positions = ... # define coupling mesh, 2D array with shape (number of vertices, dimension of physical space)
vertex_ids = participant.set_mesh_vertices("Fluid-Mesh", positions)

participant.initialize()

t = 0 # time

u = initialize_solution() # returns initial solution

while participant.is_coupling_ongoing(): # main time loop
        
    if participant.requires_writing_checkpoint():
        u_checkpoint = u

    solver_dt = compute_adaptive_time_step_size() 
    precice_dt = participant.get_max_time_step_size()
    dt = min(precice_dt, solver_dt) # actual time step size
    
    # returns 2D array with shape (n, dim)
    displacements = participant.read_data("Fluid-Mesh", "Displacement", vertex_ids, dt)
    
    u = solve_time_step(dt, u, displacements) # returns new solution
    
    # returns 2D array with shape (n, dim)
    forces = compute_forces(u) 
    participant.write_data("Fluid-Mesh", "Force", vertex_ids, forces)
    
    participant.advance(dt)

    if participant.requires_reading_checkpoint():
        u = u_checkpoint
    else: # continue to next time step 
        t = t + dt    

participant.finalize()

Coupled codes

[edit]

While preCICE is a software library with an API that can be used by programmers to couple their own code, there exist several integrations with several simulation codes, making preCICE more accessible to end users that are not primarily programmers (such as applied mathematicians, mechanical engineers, or climate scientists).

In the terminology used by preCICE, the integrations to simulation codes are called adapters[7] and can be maintained by the preCICE developers or third parties.

Example codes that preCICE integrates with via adapters include[12], among others:

The community has also coupled[7] CAMRAD II, DLR TAU, DUST, DuMuX, Rhoxyz, Ateles, XDEM, FLEXI, MBDyn, OpenFAST, LS-DYNA[13], and G+Smo.

Applications

[edit]

Academic publications by the developers and by independent research groups have demonstrated preCICE for several applications (see pointers to literature in the v2 paper [7]), while further examples are listed on the website of the project.

  • Mechanical and civil engineering
    • Aeroacoustics: See, e.g., the ExaFSA HPC project (Germany, Netherlands, Japan)[14].
    • Aerodynamics: See, e.g., work by the TU Delft on inflatable kites (Netherlands)[15].
    • Aerodynamic heating: See, e.g., a paper on hypersonic aerothermal simulations (USA)[16].
    • Explosions: See, e.g., work by the National University of Defense Technology (China)[17].
    • Urban wind modeling: See, e.g., work by the University of Manchester (UK)[18].
    • Manufacturing processes: See, e.g., work by the Austrian Institute of Technology (Austria)[13].
  • Marine engineering
    • See, e.g., work by the University of Split (Croatia)[19].
  • Bioengineering
    • Hemodynamics - heart valves: See, e.g., work by the University of Stellenbosch (South Africa)[20].
    • Hemodynamics - aorta: See, e.g., work by the UPC (Spain) and the University of Stuttgart (Germany)[21].
    • Fish locomotion: See, e.g., work by the University of Strathclyde (UK) and collaborators (China)[22].
    • Muscle-tendon systems: See, e.g., work by the University of Stuttgart[23] (Germany).
  • Nuclear fission and fusion reactors
    • Thermohydraulics: See, e.g., work by GRS (in collaboration with the Technical University of Munich and the preCICE developers) on coupled reactor thermohydraulics[24] (Germany).
  • Geophysics
  • Further examples

See also

[edit]

References

[edit]
  1. ^ a b Gatzhammer, Bernhard; Mehl, Miriam; Neckel, Tobias (June 2010). "A coupling environment for partitioned multiphysics simulations applied to fluid-structure interaction scenarios". Procedia Computer Science. 1 (1). Elsevier: 681–689. doi:10.1016/j.procs.2010.04.073.
  2. ^ "Release 3.1.2". 6 June 2024. Retrieved 24 June 2024.
  3. ^ "MSYS2 Packages - Package: mingw-w64-x86_64-precice". Retrieved 7 November 2024.
  4. ^ "FreeBSD Git repositories - root/science/precice/Makefile". Retrieved 7 November 2024.
  5. ^ a b "Software Developments - Chair of Scientific Computing". Technical University of Munich. Retrieved 5 November 2024.
  6. ^ a b Hans-Joachim Bungartz; Florian Lindner; Bernhard Gatzhammer; Miriam Mehl; Klaudius Scheufele; Alexander Shukaev; Benjamin Uekermann (2016). "preCICE – A fully parallel library for multi-physics surface coupling". Computers & Fluids. 141: 250–258. doi:10.1016/j.compfluid.2016.04.003. ISSN 0045-7930.
  7. ^ a b c d e f Chourdakis G.; Davis K.; Rodenberg B.; Schulte M.; Simonis F.; Uekermann B.; Abrams G.; Bungartz HJ.; Cheung Yau L.; Desai I.; Eder K.; Hertrich R.; Lindner F.; Rusch A.; Sashko D.; Schneider D.; Totounferoush A.; Volland D.; Vollmer P.; Koseomur OZ. (2022). "preCICE v2: A sustainable and user-friendly coupling library [version 2; peer review: 2 approved]". Open Research Europe. 2 (51): 51. doi:10.12688/openreseurope.14445.2. PMC 10446068. PMID 37645328.
  8. ^ "GitHub - xsdk-project - xSDK Community Policy Compatibility for preCICE". GitHub. Retrieved 7 November 2024.
  9. ^ Rüth, Benjamin; Uekermann, Benjamin; Mehl, Miriam; Birken, Philipp; Monge, Azahar; Bungartz, Hans-Joachim (2020). "Quasi-Newton Waveform Iteration for Partitioned Surface-Coupled Multi-Physics Applications". International Journal for Numerical Methods in Engineering. 122 (19): 5236–5257. doi:10.1002/nme.6443.
  10. ^ Willeke, Leonard; Schneider, David; Uekermann, Benjamin (2023). "A preCICE-FMI Runner to Couple FMUs to PDE-Based Simulations". In Müller, Dirk; Monti, Antonello; Benigni, Andrea (eds.). Proceedings 15th Intern. Modelica Conference. Linköping Electronic Conference Proceedings.
  11. ^ Desai, Ishaan; Scheurer, Erik; Bringedal, Carina; Uekermann, Benjamin (2023). "Micro Manager: a Python package for adaptive and flexible two-scale coupling". Journal of Open Source Software. 8 (91). The Open Journal: 5842. Bibcode:2023JOSS....8.5842D. doi:10.21105/joss.05842.
  12. ^ "preCICE website - Overview of adapters". Retrieved 7 November 2024.
  13. ^ a b Scheiblhofer, Stefan; Jäger, Stephan; Horr, Amir M. (2019). Coupling FEM and CFD solvers for continuous casting process simulation using precice. COUPLED VIII: Proceedings of the VIII International Conference on Computational Methods for Coupled Problems in Science and Engineering. CIMNE. pp. 23–32. hdl:2117/189920. ISBN 978-84-949194-5-9.
  14. ^ Lindner, Florian; Totounferoush, Amin; Mehl, Miriam; Uekermann, Benjamin; Pour, Neda Ebrahimi; Krupp, Verena; Roller, Sabine; Reimann, Thorsten; C. Sternel, Dörte; Egawa, Ryusuke; Takizawa, Hiroyuki; Simonis, Frédéric (2020). "ExaFSA: Parallel Fluid-Structure-Acoustic Simulation". In Hans-Joachim Bungartz, Severin Reiz, Benjamin Uekermann, Philipp Neumann, Wolfgang E. Nagel (ed.). Software for Exascale Computing - SPPEXA 2016-2019. Vol. 136. Cham: Springer International Publishing. pp. 271–300. doi:10.1007/978-3-030-47956-5_10. ISBN 978-3-030-47955-8.{{cite book}}: CS1 maint: multiple names: editors list (link)
  15. ^ Folkersma, Mikko; Schmehl, Roland; Viré, Axelle (2020). "Steady-state aeroelasticity of a ram-air wing for airborne wind energy applications". Journal of Physics: Conference Series. 1618 (3). IOP Publishing: 032018. Bibcode:2020JPhCS1618c2018F. doi:10.1088/1742-6596/1618/3/032018.
  16. ^ Signorelli, Joseph M.; Higgins, Ian R.; Maszkiewicz, Samuel A.; Laurence, Stuart; Bodony, Daniel J. (2024-07-29). "Hypersonic Aerothermal Computations of a Sharp Fin Interaction". AIAA AVIATION FORUM AND ASCEND 2024. AIAA AVIATION FORUM AND ASCEND 2024. Las Vegas, Nevada: American Institute of Aeronautics and Astronautics. doi:10.2514/6.2024-3548. ISBN 978-1-62410-716-0. Retrieved 2024-10-02.
  17. ^ Zhang, Sen; Guo, Xiao-Wei; Li, Chao; Liu, Yi; Zhao, Ran; Yang, Canqun (2020). "Numerical Study of Fluid-Structure Interaction Dynamics under High-explosive Detonation on Massively Parallel Computers". 2020 IEEE 22nd International Conference on High Performance Computing and Communications; IEEE 18th International Conference on Smart City; IEEE 6th International Conference on Data Science and Systems (HPCC/SmartCity/DSS). pp. 525–531. doi:10.1109/HPCC-SmartCity-DSS50907.2020.00065.
  18. ^ Revell, A; Afgan, I; Ali, A E A; Camps Santasmasas, M; Craft, T; de Rosis, A; Holgate, J; Laurence, D; Iyamabo, B E O; Mole, A; Owen, B; Savoie, M; Skillen, A; Wang, J; Zhang, X (2020). "Coupled Hybrid RANS-LES Research at The University of Manchester". ERCOFTAC Bulletin. 120. European Research Community on Flow, Turbulence And Combustion: 67. Retrieved 2024-11-21.
  19. ^ Andrun, Martina; Bašić, Josip; Blagojević, Branko; Klarin, Branko (2020). "Simulating hydroelastic slamming by coupled Lagrangian-FDM and FEM". HSMV 2020. IOS Press. pp. 135–142. doi:10.3233/PMST200036.
  20. ^ Davis, Kyle (2018). Numerical and experimental investigation of the hemodynamics of an artificial heart valve (Thesis). University of Stellenbosch. Retrieved 2024-11-21.
  21. ^ Naseri, Alireza; Totounferoush, Amin; González, Ignacio; Mehl, Miriam; Pérez-Segarra, Carlos David (2020). "A scalable framework for the partitioned solution of fluid–structure interaction problems". Computational Mechanics. 66 (2). Springer: 471–489. Bibcode:2020CompM..66..471N. doi:10.1007/s00466-020-01860-y.
  22. ^ Luo, Yang; Xiao, Qing; Shi, Guangyu; Wen, Li; Chen, Daoyi; Pan, Guang (2020). "A fluid–structure interaction solver for the study on a passively deformed fish fin with non-uniformly distributed stiffness" (PDF). Journal of Fluids and Structures. 92. Elsevier: 102778. Bibcode:2020JFS....92j2778L. doi:10.1016/j.jfluidstructs.2019.102778.
  23. ^ Maier, Benjamin; Schneider, David; Schulte, Miriam; Uekermann, Benjamin (2023). Nagel, Wolfgang E.; Kröner, Dietmar H.; Resch, Michael M. (eds.). Bridging scales with volume coupling - Scalable simulations of muscle contraction and electromyography. High Performance Computing in Science and Engineering '21. Cham: Springer International Publishing. pp. 185–199. doi:10.1007/978-3-031-17937-2_11. ISBN 978-3-031-17937-2.
  24. ^ Herb, Joachim; Weyermann, Fabian (2024-04-25). "Implementation of the preCICE coupling interface for AC2/ATHLET". Kerntechnik. 89 (2): 185–201. doi:10.1515/kern-2023-0119. Retrieved 2024-11-12.
  25. ^ Jaust, Alexander; Weishaupt, Kilian; Mehl, Miriam; Flemisch, Bernd (2020). "Partitioned Coupling Schemes for Free-Flow and Porous-Media Applications with Sharp Interfaces". In Klöfkorn, Robert; Keilegavlen, Eirik; Radu, Florin A.; Fuhrmann, Jürgen (eds.). Finite Volumes for Complex Applications IX - Methods, Theoretical Aspects, Examples. Springer International Publishing. pp. 605–613. doi:10.1007/978-3-030-43651-3_57. ISBN 978-3-030-43651-3.
  26. ^ Böttcher, Fabian; Davis, Kyle; Halilovic, Smajil; Odersky, Leonhard; Pauw, Viktoria; Schramm, Thilo; Zosseder, Kai (2021). Optimising the thermal use of groundwater for a decentralized heating and cooling supply in the city of Munich, Germany (Report). Copernicus Meetings. doi:10.5194/egusphere-egu21-14929.
  27. ^ Munafò, Alessandro; Chiodi, Robert; Kumar, Sanjeev; Maout, Vincent Le; Stephani, Kelly A; Panerai, Francesco; Bodony, Daniel J; Panesi, Marco (2022). A Multi-Physics Modeling Framework for Inductively Coupled Plasma Wind Tunnels. AIAA SCITECH 2022 Forum. p. 21. doi:10.2514/6.2022-1011.