finite element in two layers

This question was flagged by Dyuman Joshi
  • Flagged as Not appropriate for MATLAB Answers by Dyuman Joshi on 8 Nov 2025.

    Looks like a homework question/project

What should the finite element Matlab code look like in order to solve such a PDE in two layers?

7 Comments

Torsten
Torsten on 8 Nov 2025
Edited: Torsten on 9 Nov 2025
You have 7 equations in 6 unknowns. Thus one of the equations must be superfluous - most probably because pressure is missing as a solution variable.
This is true so i updated the file now it has 6 on 6.
Torsten
Torsten on 10 Nov 2025
Edited: Torsten on 10 Nov 2025
Since you have second-order PDEs for U and V, only one transmission condition for U at y = 0.8 (U1 = U2) is not sufficient. As for theta, you need a second condition connecting dU1/dy and dU2/dy.
And what is the domain on which you want to solve your equations ? What are the conditions on the outer boundaries ((x = 0, ymin <= y <= ymax) and (x = 1, ymin <= y <= ymax) and (0 <= x <= 1, y = ymin) and (0 <= x <= 1, y = ymax)) ?
Maybe you could also explain what the variables U, V and Theta mean and what you try to model.
I'm attempting to modify the problem in the attachment, and I anticipate that the FEM in Matlab code will be an effective method for this geometry.
Torsten
Torsten on 14 Nov 2025
Edited: Torsten on 14 Nov 2025
After taking a look at the article, I'm no longer sure what you are asking for. Do you intend to write code for generating unstructured tetrahedral meshes for the complex geometry and to solve the fluid dynamic equations using the finite element method on it ? I think you have no chance to succeed if you can't start from an existing similar code (which I'm not aware of). Even fluid dynamic software packages like ANSYS don't have the capability to solve on different layers with prescribed interface conditions.
Thank you for your feedback — I really appreciate your perspective. Yes, the goal is to generate an unstructured mesh for the geometry and solve the coupled fluid–thermal equations using FEM. I understand that it’s challenging, but I’m optimistic. Even if existing packages don’t directly support multilayer interface conditions, it should still be possible to build a simplified or custom implementation by extending known techniques (e.g., multi-domain meshing, weak interface enforcement, or penalty-based coupling).
Maybe OPENFOAM is a starting point:

Sign in to comment.

Answers (0)

Products

Release

R2025b

Asked:

on 8 Nov 2025

Commented:

on 15 Nov 2025

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!