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

Impose a free surface condition #2283

Closed
L29430 opened this issue Jun 1, 2021 · 11 comments
Closed

Impose a free surface condition #2283

L29430 opened this issue Jun 1, 2021 · 11 comments

Comments

@L29430
Copy link

L29430 commented Jun 1, 2021

Hello everybody,

I'm working on a fluid dynamics case, with two-phase flow. Fluids are separated by a free surface. With an interface capturing method, I can find the position of the free surface at any time t. I would like to know if it's possible to impose a Dirichlet condition on this free surface, which is not a boundary of the domain?

Regards,

@vladotomov
Copy link
Member

vladotomov commented Jun 3, 2021

Hi @L29430,

If the surface is aligned with the mesh, you can probably impose Dirichlet BC to the linear system.

If the surface is not aligned, you should consider approximate/weak enforcement as in this paper. Related MFEM code can be found in #2043, however, the correct weak form depends on the equations you're solving.

Other approaches to do this are CutFEM and XFEM, but MFEM does not have these capabilities.

Best,
Vladimir

@v-dobrev
Copy link
Member

v-dobrev commented Jun 5, 2021

Just to add to @vladotomov's answer: when the interface is aligned with the mesh, you can impose a Dirichlet b.c. on the interface the same way as on an external boundary. You need to make sure that the interface in described in the input mesh file as a set of "boundary" elements with some corresponding "boundary" attribute that identifies the interface. With that, setting up Dirichlet b.c. on the interface can be done as in example 1/1p except that you only mark the interface attribute with 1 in the array ess_bdr -- note that attribute attr (which is assumed to be >= 1 in MFEM) is marked by setting the entry ess_bdr[attr-1] to 1.

@L29430
Copy link
Author

L29430 commented Jun 8, 2021

Hi @L29430,

If the surface is aligned with the mesh, you can probably impose Dirichlet BC to the linear system.

If the surface is not aligned, you should consider approximate/weak enforcement as in this paper. Related MFEM code can be found in #2043, however, the correct weak form depends on the equations you're solving.

Other approaches to do this are CutFEM and XFEM, but MFEM does not have these capabilities.

Best,
Vladimir

Hello Vladimir,

I'm solving a Laplace equation, so I would be very interested to understand the Shifted Diffusion Miniapp :)
How can I download the shifted files at the following link : https://github.com/mfem/mfem/tree/master/miniapps/shifted. Uploads are disabled.

Best,

@L29430

@vladotomov
Copy link
Member

I'm not sure if Github supports downloading individual files.
The best way is to clone the Github repository. This way you can also build the code and run the miniapp.

Best,
Vladimir

@L29430
Copy link
Author

L29430 commented Jun 9, 2021

I'm not sure if Github supports downloading individual files.
The best way is to clone the Github repository. This way you can also build the code and run the miniapp.

Best,
Vladimir

Hello Vladimir,

I copied the shifted repository in miniapps, in the library. But it didn't run... I don't know why.

@L29430
Copy link
Author

L29430 commented Jun 14, 2021

Hello,

I copied the shifted repository in miniapps, in mfem-4.2. When I'm in this new repository, the "make" command doesn't work, I cannot get the .exe files. Is there a particular step to know to run this miniapp ?

Best,

@vladotomov
Copy link
Member

Hi @L29430,

Are you working on a Linux or a Windows machine? What is the error you're getting?
Please also look at the INSTALL file.

Best,
Vladimir

@L29430
Copy link
Author

L29430 commented Jun 14, 2021

Hi @L29430,

Are you working on a Linux or a Windows machine? What is the error you're getting?
Please also look at the INSTALL file.

Best,
Vladimir

Hello,

I'm working on a linux machine, my error is :

make: nothing to do with "all".

I have already looked at the INSTALL file, it doesn't say anything about the installation of this miniapp.

@L29430
Copy link
Author

L29430 commented Jun 16, 2021

Hello Vladimir,

Can you tell me where I can find the document needed to install the shifted miniapp ?

Best.

@vladotomov
Copy link
Member

Hi @L29430,

First you should build the MFEM library in parallel and run some of the parallel examples to make sure everything works as expected. Then you can build the shifted diffusion miniapp in /miniapps/shifted.

Vladimir

@stale
Copy link

stale bot commented Jul 16, 2021

⚠️ This issue or PR has been automatically marked as stale because it has not had any activity in the last month. If no activity occurs in the next week, it will be automatically closed. Thank you for your contributions.

@stale stale bot added the stale label Jul 16, 2021
@stale stale bot closed this as completed Jul 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants