|
[Sponsors] |
May 27, 2021, 06:01 |
Solve a single equation on 2 meshes?
|
#1 |
New Member
Giovanni Luddeni
Join Date: Jan 2021
Posts: 14
Rep Power: 5 |
Hi,
I have a solver containing a laplacian equation, something like: lap(x) = field Where field is a volScalarField and the BCs are x=0 on every patch. This works obviously very smoothly, even in parallel. Now I split my domain in 2 meshes, cause I aim to simulate 2 different fluids (using not only different properties but maybe even slightly different models/equations). For what I can understand, splitting the system in 2 different systems requires another BC applied to the dividing face, either Dirichlet or Neumann. I don't want to provide another BC tho, since I don't think it's necessary. Openfoam in some way finds a way to parallelize the computation, so I should be able to do the same. I would like to avoid iterative methods as well, since I don't think it's necessary to use one. Writing down the system matrix, assuming a central finite difference for the laplacian, I get a tridiagonal matrix with 1 -2 1 in the diagonal place on each row. I could easily split the system using a backward finite difference on the last element of the previous block and a forward on the following one; yet in openfoam I don't have direct access to the matricies and the coefficients, so I guess this is not the openfoam way to solve my problem. A solution, as the title suggest, could be to combine the 2 meshes in 1 to solve this equation, I would like to avoid to add a third mesh (made by the combination of the 2) on the case level, since it seems counterintuitive and redundant. Is there a way to create a field which lies on 2 meshes to solve this problem? Or to create, in the solver source, a fvMesh which combines the 2? I could easily then map the cells of the meshes and get my fields once the equation is solved. I'm open to any suggestion. Thank you |
|
June 1, 2021, 13:13 |
|
#2 |
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 15 |
There are some existing solvers that could provide a good reference.
It sounds like the interFoam family of solvers could be a good starting point. For those solvers a "phase fraction" field is used to toggle between different fluids, which are then solved with a single set of equations (on a single mesh). Custom thermo is used to compute properties for the domain based on the toggle field and each fluid. Otherwise, the chtMultiRegion family of solvers could be another good resource. They do solve separate equations (on separate meshes) which are then coupled at mesh interfaces -- often via mapped boundary conditions. Caelan
__________________
Public git repository : https://github.com/clapointe2011/public |
|
Tags |
multi domain, regions |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with Velocity Poisson Equation and Vector Potential Poisson Equation | mykkujinu2201 | Main CFD Forum | 1 | August 12, 2017 14:15 |
solve an implicit equation in UDF | Rui_27 | Fluent UDF and Scheme Programming | 0 | September 8, 2014 11:12 |
solve equation | michaelsmit | OpenFOAM Running, Solving & CFD | 4 | March 24, 2011 06:35 |
Constant velocity of the material | Sas | CFX | 15 | July 13, 2010 09:56 |
how solve a scalar equation with Fluent | tomik | FLUENT | 0 | January 5, 2006 07:38 |