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

Add OpenFOAM partitioned heat equation #214

Closed
wants to merge 3 commits into from
Closed

Conversation

MakisH
Copy link
Member

@MakisH MakisH commented May 11, 2021

This is an attempt to port the 2x-laplacianFoam case from the OpenFOAM adapter repository and shape it to simulate the same problem as the FEniCS and Nutils cases that are already here.

Change with side effects: In the precice-config.xml, the data Flux needs to be renamed to Heat-Flux, as the OpenFOAM adapter uses the data name (prefix) to determine the data type. Naming it Flux in the first case sounds like a historical residue and does not agree with our flow-over-heated-plate case. This change means that the data needs to be renamed in the (case-specific) FEniCS and Nutils examples.

This is only an incomplete attempt, as I cannot manage to set the heat source and sink to be a single point/cell in OpenFOAM. I have tried different (less or more wrong) approaches:

  • Define an L-shape faceSet and create a patch from it using createPatch. This is the setup I include here. It runs, but not as expected: the additional patch does not get any temperature values and ParaView complains. A problem may be that there is a conflict of boundary conditions for the same faces.
  • Define a cellSet and set its internal field with setFields. Somehow this also gave weird results.
  • Define a smaller box around the corner in blockMeshDict. I guess the problem there was that the blocks were overlapping.

A trivial workaround is to set the complete bottom & left walls of the Dirichlet participant as a heat sink and the complete top & right walls of the Neumann participant as a heat source (I think I even swapped the names accidentally). But this is then a different setup and the isolines have completely different shape.

@davidscn if you want, feel free to start from this and debug it.

TODO:

  • Make the case work with point source & sink.
  • Check the case parameters for consistency. I have set T_sink = 1, T_source = 8, k = 3 (which should be alpha). I have no clue what to do with beta.
  • Make the same changes also to the Neumann participant.
  • Cleanup any unused files: topoSetDict, createPatchDict, unused settings in blockMeshDict/T, etc.
  • Update FEniCS / Nutils for Flux/Heat-Flux
  • Add entry in the README.md

The original motivation for this case was to study precice/openfoam-adapter#93. The issue is observable also in the current state of the case.

This also closes #204.

@davidscn
Copy link
Member

After some investigations:
I don't think we can use laplacianFoam for this test case, since laplacianFoam solves the heat equation with a zero RHS whereas the described test case has a non-zero RHS. We could adjust the existing test case by applying the constraint RHS=0 using alpha and beta (set beta=2+2*alpa), but I'm not sure if this would be intended.

@MakisH
Copy link
Member Author

MakisH commented Jul 29, 2021

Closing as duplicate of the now merged #223.

@MakisH MakisH closed this Jul 29, 2021
@MakisH MakisH added this to the v202104.2.0 milestone Feb 9, 2022
@MakisH MakisH deleted the add-hh-openfoam branch November 22, 2023 09:31
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.

2 participants