Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for OpenFOAM 10 tutorials #532

Draft
wants to merge 265 commits into
base: OpenFOAM10
Choose a base branch
from
Draft

Conversation

MakisH
Copy link
Member

@MakisH MakisH commented Apr 26, 2024

It may help to have a look at the file CONTRIBUTING.md for a few hints and guidelines. -->

Currently, the following tutorials run but give very wrong results with the branch OpenFOAM10 of the adapter:

  • partitioned-heat-conduction
  • flow-over-heated-plate
  • perpendicular-flap

This currently includes the changes from master, but the target branch is not updated yet, as merging is the whole issue here.

BenjaminRodenberg and others added 30 commits October 3, 2022 17:08
* forward compatibility

This patch removes the leading dashes for cli arguments in the run script,
which were always optional but have recently been forbidden. The changes are
compatible with all versions of nutils.

* disable rich output

This patch disables rich output by default, in order for standard output
logging to co-exist nicely with precice's log messages.

* remove droptol for projection of initial condition

This patch removes the droptol argument in the projection of the initial
condition, which is a full domain projection that should include all degrees of
freedom.

* simplify definition of sqr0

This patch simplifies the boundary constraints by using uexact.

* switch from asfunction to sample.basis

This patch replaces sample.asfunction by sample.basis combined with an argument
for readdata. While both constructions yield the same object internally
(asfunction uses basis under the hood), the new form makes it possible to
construct functionals ahead of time and benefit from cached data structures,
rather that recreate them at every iteration (see next commit).

* remove redefinition of sqr and res in time loop

This patch defines res and sqr outside the time loop, so that the only things
changing per timestep are the arguments (including readdata). The resulting
code is both cleaner and faster due to reuse of cached structures.

* introduce precice_read, precice_write

This patch simplifies the read and write instructions by sticking the arguments
inside functools.partial, leaving a more readable remainder of the code.

* improve flux evaluation

This patch replaces the projection matrix by a functional based equivalent that
is a bit more ideomatic nutils. It also fixes a consistency issue at the ends
of the boundary and adds an elaborate comment to explain the construction.

* streamline checkpointing

This patch bundles the checkpointed state in a single `checkpoint' tuple and
unifies output if the initial condition and following time steps.

* make parameters into function arguments

This patch makes all parameters into arguments of main so that they can be
configured from the command line (though not via run.sh). This makes it
possible, for example, to experiment with different timesteps on either half of
the simulation.
in partitioned-heat tutorial
* Tutorial illustrates a simple case which can be used for convergence studies and waveforms
* Case is taken from V. Schüller, B. Rodenberg, B. Uekermann and H. Bungartz, A Simple Test Case for Convergence Order in Time and Energy Conservation of Black-Box Coupling Schemes, in: WCCM-APCOM2022. URL https://www.scipedia.com/public/Rodenberg_2022a

Co-authored-by: Benjamin Uekermann <[email protected]>
…ecice#307)

* Put images of channel-transport-reaction in images/ folder

* Changing image names to have a prefix tutorials-channel-transport-reaction-
Co-authored-by:  Gertjan van Zwieten  <[email protected]>
Co-authored-by: Benjamin Uekermann <[email protected]>
Co-authored-by: Benjamin Uekermann <[email protected]>
Co-authored-by: Ishaan Desai <[email protected]>
Co-authored-by: Gerasimos Chourdakis <[email protected]>
* Rename multiple-perpendicular-flaps mesh names

* Rename participant and meshes

Solid1 becomes Solid-Left, and Solid2 becomes Solid-Right following the directory names.
We could further rename these, together with the directory names.

For the Fluid meshes, we just use Upstream and Downstream as indicators.

For the Solid meshes, we follow the usual Participant-Mesh name.

The data fields are named based on the Upstream/Downstream.

* Rename OpenFOAM interfaces based on patches

* Rename OpenFOAM interfaces

* Rename Left and Right to Upstream and Downstream

* Rename folder left and right

* Fix more outdated things in README

* Update plotDispls script

* Fix the other script as well

Co-authored-by: Benjamin Uekermann <[email protected]>
While it fixed the segfault, it actually disabled the Force coupling.
Co-authored-by: Benjamin Uekermann <[email protected]>
* Update broken link
* Remove redundancy for less maintainment
precice#318)

* replaced all <use-mesh> tags by <receive-mesh> and <provide-mesh> tags in */precice-config.xml in order to make it compatible with current preCICE versions

* added changelog 318.md for this PR

* Update changelog-entries/318.md

Co-authored-by: David Schneider <[email protected]>

Co-authored-by: timo-schrader <timo-schrader>
Co-authored-by: David Schneider <[email protected]>
)

* adding fenicsx solver to partitioned-heat-equation tutorial

* Delete printStats.py

* cleanup work

* changed README.md

* output reference solution

* Changed output folder
* Remove mapping timings

* Add changelog entry
davidscn and others added 30 commits March 26, 2024 12:30
…d `elastic-tube-3d/solid-fenics` (precice#505)

Co-authored-by: Gerasimos Chourdakis <[email protected]>
…on tutorial faster (precice#516)

* Use 4 processors and remove the initial Allen Cahn solving step

* Save porosity value in initialize so that it used in the first solve call

* Formatting

* Revert to running the Micro Manager with 2 processors, as the runtime is ~10 minutes

* Remove excess radius factor to account for correction of the diffuse interface width
* [two-scale-heat-conduction] adapt to micro-manager-v0.4.0

* [two-scale-heat-conduction] use dumux install script from release 3.7

* [two-scale-heat-conduction] make setup-dumux.sh more robust

* Add comment about running setup-dumux.sh in the README

* [two-scale-heat-conduction] suppress DUNE_CONTROL_PATH in setup

---------

Co-authored-by: Ishaan Desai <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.