BC as function of two different boundaries

Numerical methods and mathematical models of Elmer
Post Reply
elmeRocks
Posts: 2
Joined: 07 Oct 2013, 14:05
Antispam: Yes

BC as function of two different boundaries

Post by elmeRocks »

First of all I want to thank you, this is a great piece of software and the community is very active. :)

I'm new to Elmer and I'm trying to model a permeation membrane, I've attached the case. The top part of the mesh has an air inlet and two outlets on the sides; the bottom part is the same, but with a different gas and a different oxygen concentration. I was trying to model the oxygen flow across the membrane (that is on surface 7, while 5 and 6 are porous materials, 3 and 4 just walls) using a custom equation that I have. I'm not insterested in computing the flow in the membrane surface, I could treat it as a wall, I just need to introduce this equation as boundary condition for the concentration flux (I guess) in adv-diff equation so that Elmer knows that there's something going out on one side and entering the other. The problem is that the equation for the flux is defined with the partial pressure difference between the two sides of the membrane; I read how to define a BC using the local conditions, but how do I specify a BC on a boundary requiring also the partial pressure computed on the other boundary?

I hope you understood the problem, otherwise feel free to ask anything and I'll reply as soon as possible.

By the way, you'll notice that I also have some problems with the pressure and concentration fields, while the velocity field looks ok. I'm new to Elmer as I told you so I'm probably doing a lot of things wrong :)
If you have any other suggestion on how I could do this, please let me know. Thanks! :D
Attachments
planar.zip
(772.21 KiB) Downloaded 249 times
elmeRocks
Posts: 2
Joined: 07 Oct 2013, 14:05
Antispam: Yes

Re: BC as function of two different boundaries

Post by elmeRocks »

Maybe the subroutine getscalarlocalsolution in Defutils could help me, but as I'm new I'm not sure how to use it. I can't call Defutils.mod for some reason, I copied it into the dll folder and called it but Elmer doesn't find it. Do you think I could use that procedure in a sif file without having to compile anything? Because for some reason I can't compile anything in windows (no unix unfortunately :( ) as when I have to include Defutils or any other module it says Wrong module version '0' or something similar. I installed the precompiled package of Elmer and according to the folder name the gcc used should be 4.3.3, which is what I'm using...

So could you help me understand if I can use that subroutine to get the local concentrations on two different elements that I specify, and write a function that uses those values to calculate the flux for the BC? Or if I can find some other solution to do what I need to? Unfortunately I'm stuck in the work for my thesis without this part :( I would be forced to look for an alternative to Elmer that I'm actually loving. Any help, ideas, comment, feedback is highly appreciated :D
AYEM
Posts: 2
Joined: 23 May 2018, 12:20
Antispam: Yes

Re: BC as function of two different boundaries

Post by AYEM »

Hi,

i'm new in elmer so, i don't khnow a lot but i need this information quickly for big meeting
i want introduce equation in .sif ( heat flow is not constant) but my equation includes theta modulo 2pi for boundary condition
how i put it????? :cry: :cry: :cry:
thanks all
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: BC as function of two different boundaries

Post by mzenker »

Hi,

for variation in space you can use something like

Code: Select all

Heat Flow = Variable Coordinate 1, Coordinate 2, Coordinate 3
    Real MATC "f(tx(0), tx(1), tx(2))"
    End
where f(x,y,z) is the function (you need to define that with MATC) that varies the heat flow and tx(i) (i=1,2,3) are the coordinate 1, coordinate 2 and coordinate 3 variables.
Similarly, you can use "Time" as variable.
For details about MATC see MATC manual.

HTH,

Matthias
Post Reply