-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
Small offset when reading gradients (fluid-fluid coupling specific) #93
Comments
We should test whether we can reproduce this behavior with a simple heat transfer case, so coupling |
I set up a heat transfer case coupling deal.II and a custom laplacianFoam considering non-zero RHS in order to investigate this. The example is our partitioned-heat example, which has a quadratic solution in space and a linear solution in time. OpenFOAM uses 5 x 5 FV elements and deal.II discretizes the domain using quadratic shape functions which solves the problem more or less exact. Doing a single explicitly coupled time step in time reveals the following curvatures: There is clearly a kink at the coupling interface. However, there is no permanent offset of the Temperature curvature. The reason is probably the When writing gradients, we use surface normal gradients. I'm not yet completely sure because I have not fully investigated this case, but the problem might be similar. However, the surface normal gradient scheme can be specified in the fvSchemes dict as opposed to the fixed gradient and there might be an option I have not yet seen. In order to investigate this further I boiled our partitioned heat example from second order in space to first order in space down (RHS = beta) and the example looks as follows:
In addition, the observation would be consistent with the issue occurring only for coarse meshes as the linear error goes down with very meshes in interface normal direction. Regarding the Fluid-Fluid coupling above: Tweaking the boundary conditions a bit and running an explicit coupling gives me |
Thank you very much for looking so carefully on this! Just a question:
What exactly did you change here? I guess something in the
I assume here you mean that deal.II reads Temperature values, right? |
No it is indeed a change within the OpenFOAM solver. @uekerman thought the partitioned-heat solver with OpenFOAM might be valuable for different reasons. We still need to discuss where to put it..
..reading Heat-flux and writing Temperature values. So, yes deal.II reads them. Will look a bit more in the partitioned pipe as there are some things I want to try. |
What if OpenFOAM is the Dirichlet participant. Do we then also see a kink? |
To sum this up: I cannot reproduce the original issue here with a partitioned-heat example and I still think that you cannot simply use |
@MakisH what I observed for the CHT cases now (considering the fixes) looks as follows: I only observe this for intermediate time steps, not for the final time step. For me, it looks like a thermal boundary layer/ the transient behavior of the simulation and I can also observe it using the default (fine) mesh and coarser meshes. Is this what you observed or was it something different? |
Yes, this is what I observed as well. Do you mean that this has a physical explanation? |
And the quantitative result is then rather independent of the mesh? |
I also noticed that the previous coupling of ATHLET-OpenFOAM (by GRS) used modified boundary conditions based on
I guess the gap corresponds to the distance between the interface cell center and the corresponding face? Why "different data fields"? Both are named
Maybe some conversion between point and cell data would help? |
What do you mean by previous? There was a Fluid-Fluid coupling before?
With different I mean quantities such as U, which are apparently not part of the solid. The output is some lengthy and cryptic paraView stack trace.
The problem might be that the stored gradient is not resolved correctly? How can I exclude that a potential misalignment does not stem from paraView. Visualizing these coupled cases is a bit of a challenge.. |
Only between ATHLET and OpenFOAM, using an in-house system, not preCICE. Reproducing something similar with preCICE is the project I am working on.
In ParaView, you can disable specific fields. Maybe this helps?
It definitely is! One approach I can think of would be inspecting specific points in a spreadsheet: https://docs.paraview.org/en/latest/UsersGuide/selectingData.html Another approach would be converting first to VTK and comparing: do you get the same effect? |
Ah ok, but all Fluid-Fluid OpenFoam progress is collected in the tutorials, right?
This helps, indeed, and results in no further offsets. The two lines are essentially connected.
foamToVTK has the same issue as before, doesn't really help and confuses a bit more since the implementations among the vendors seems to be different. |
yes
Could you please still upload a picture here for documentation purposes? |
Just to document: technically, So, currently the fluid-fluid module technically works for |
To document the state: we are working on this together with @thesamriel, in the context of his Master's thesis.
Indeed, what @thesamriel found already, is that |
Dear all, I am trying to do a fluid fluid coupling involving an interFoam solver on the left and right domain respectively( See attached picture). The case presented here is the wave flume case inside the tutorial case of openFoam interFoam/laminar/wave folder. In this case, inside precise dict, the left side is writing velocity and alpha while reading in pressure and purge. the right side is writing pressure and prgh and reading in velocity and alpha. Alpha is the interphase fraction. The issue I am facing is some sort of wave reflection on the left domain, more specifically, it is an issue of back flow. In this example, I have simply used here fixed gradient for the velocity outlet on the left domain and fixed value for the velocity inlet of the right domain. The simulation was able to run for a while until wave reflections start building up on the left domain outlet. Please advise on what type of boundary conditions can be used on the left domain outlet to prevent this issue? I have also tried inletOutlet on the left domain outlet but it only allow the simulation to run longer, but wave reflection eventually build up on the left domain outlet.  and may also be able to help. |
HI Makis, we have identified the issue as something related to the outlet boundary of the left domain. Subsequently, we were able to get the simulation running and obtain better results through the use of a wave absorption Boundary condition from olaflow (openfoam solver catered for ocean engineering problems). Although there is still some wave reflection at the left domain outlet even after using the wave Absorption boundary. This of course could not be completely removed unless a complete wave absorbing boundary condition can be devised. The complexity in this issues lies in the fact that this is a multiphase flow. |
Closed by #281 |
As presented in the 14th OpenFOAM Conference, when reading gradients we end up with a minor increase in the respective quantity.
We observed this in fluid-fluid coupling (see #60) when coupling {pressure} with {velocity, pressure gradient} and using a coarse mesh. However, this problem also appears in CHT cases (reading heat flux), but we hadn't noticed until now since we are always using very fine meshes there.
In the following figure you can see this error when coupling gradients. When coupling only velocity and pressure, this problem does not appear, although we still get an oscillation around the interface.
We currently suspect a technical problem in the way we read and write gradients, or some other numerical issue.
openfoam-adapter/FF/PressureGradient.C
Lines 21 to 75 in 857f18c
You can try this in our pipe-pipe tutorial.
The text was updated successfully, but these errors were encountered: