CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Diffusion Equations coupled by Boundary Conditions (https://www.cfd-online.com/Forums/main/167427-diffusion-equations-coupled-boundary-conditions.html)

Amiga-Freak March 1, 2016 11:39

Diffusion Equations coupled by Boundary Conditions
 
Hi, I'm new here and not sure whether my question is in the right place.

I have the following problem:

I'd like to solve two diffusion equations, e.g.
\partial_t u - D_1\Delta u = 0,\;\;u = f(w)\; on\; \partial \Omega
and
\partial_t w - D_2\Delta w = 0,\;\; \partial_nw = g(u)\; on\; \partial \Omega

which means the PDEs are coupled by their boundary conditions.
The solution of u depends on w by a Dirichlet BC.
And w depends on u by a Neumann BC.

At the moment I first solve the equation for u, then compute g(u) and afterwards solve the equation for w, which allows me to compute f(w) for the next iteration, etc. ....

This works very nice for the stationary case, i.e. for \partial_t u = \partial_t w = 0
For the time dependent case however....the method is highly unstable.

I'm searching now for a method to solve both equations simultaneously, somehow - instead of one after another.

But I have no clue how to do this. If one searches for literature about this issue, it seems nobody has ever had the problem to solve PDEs coupled by boundary conditions.

Any hint? Any literature? Ideas?

BTW: I'm not working with any commercial software, but a own FEM software written in Fortran. Therefore please don't recommend commercial software.

Greetings,
Amiga-Freak

FMDenaro March 1, 2016 12:06

Quote:

Originally Posted by Amiga-Freak (Post 587574)
Hi, I'm new here and not sure whether my question is in the right place.

I have the following problem:

I'd like to solve two diffusion equations, e.g.
\partial_t u - D_1\Delta u = 0,\;\;u = f(w)\; on\; \partial \Omega
and
\partial_t w - D_2\Delta w = 0,\;\; \partial_nw = g(u)\; on\; \partial \Omega

which means the PDEs are coupled by their boundary conditions.
The solution of u depends on w by a Dirichlet BC.
And w depends on u by a Neumann BC.

At the moment I first solve the equation for u, then compute g(u) and afterwards solve the equation for w, which allows me to compute f(w) for the next iteration, etc. ....

This works very nice for the stationary case, i.e. for \partial_t u = \partial_t w = 0
For the time dependent case however....the method is highly unstable.

I'm searching now for a method to solve both equations simultaneously, somehow - instead of one after another.

But I have no clue how to do this. If one searches for literature about this issue, it seems nobody has ever had the problem to solve PDEs coupled by boundary conditions.

Any hint? Any literature? Ideas?

BTW: I'm not working with any commercial software, but a own FEM software written in Fortran. Therefore please don't recommend commercial software.

Greetings,
Amiga-Freak


numerical instability appears if you do not use a time step within the stability region. What criterion have you used?

Amiga-Freak March 1, 2016 12:38

Quote:

Originally Posted by FMDenaro (Post 587579)
numerical instability appears if you do not use a time step within the stability region. What criterion have you used?

Well, there you have me....
I have not given much thought of this at all, so far :o

FMDenaro March 1, 2016 14:29

What about the functions for the bc.s ?

Amiga-Freak March 1, 2016 14:57

Quote:

Originally Posted by FMDenaro (Post 587601)
What about the functions for the bc.s ?

What do you like to know about them?

pivalse March 1, 2016 16:07

It seems that your instability (I am saying this without knowing anything about the way you implement this numerically...) is due to the fact that while the equation system is elliptical (everything happens instantaneously everywhere at each time-step), you introduce a time-lag between the first equation and the second.

Did you write the solver yourself?
In that case, writing it to solve the two equations at the same time should be straight-forward. A more elegant solution would be to write the solver as implicit. Compared to Navier-Stokes equation, your set is relatively simple and, above all, linear. This means that the implicit solver, even in 2D and 3D, remains quite simple.
The advantage is that the boundary conditions are imposed at the same of the solution.

If you did not write the code, you may "trick" the solver into solving both equations (they are the same) by using a vector that is twice as big {u | w} instead of each vector {u} and {w}

FMDenaro March 1, 2016 16:40

The set of equations is parabolic in the unsteady case and classical numerical integrations, such as the Crank-Nicolson method, can be used.

The only care is to provide BC.s that ensure that the time derivatives do not blow-up. For example, the Neumann BC.s for w can be critical, it is simple to see that by integration over the whole computational domain V:

d/dt Int [V] w dV = D2 Int[S] g(u) dS


Therefore, if g(u) is such that Int[S] g(u) dS > 0 then the integral of the w will blow-up in time

pivalse March 1, 2016 19:53

Thanks for the correction, FMDenaro. I guess I overlooked the derivative over time.
I agree, parabolic --> Crank-Nicholson

Please, disregard my previous comment

Amiga-Freak March 2, 2016 04:26

Quote:

Originally Posted by pivalse (Post 587607)
Did you write the solver yourself?

No, I'm a PhD student and the solver was written by other PhD students before me, several years ago.

Quote:

..., you may "trick" the solver into solving both equations (they are the same) by using a vector that is twice as big {u | w} instead of each vector {u} and {w}
That was actually the first idea, I had. But my problem is that I don't know how to impose the boundary conditions - because they are dependent on the solutions u and w.
Maybe It's easy and I'm just dumb, but I don't see how to do this.


All times are GMT -4. The time now is 05:35.