Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Bondary condition: how do switch in time from Dirichlet to Neumann?

Gabriele Della Vecchia

Please login with a confirmed email address before reporting spam

Hi, I'm working with the earth science modulus.
I have a boundary condition that is

* For t<t1, the concentration of my chemical species is known (dirichlet)

*For t>t1, the flux of that species is null (neumann)

How can I switch from one condition to the other?

Thank you,
Gabriele

2 Replies Last Post 23 oct. 2013, 12:26 UTC−4

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 11 août 2010, 04:19 UTC−4
Hi Gabrielle,

The simplest way is probably to use the convective boundary condition
( 3rd kind condition) witch is something like:

dc/dx= h*(cb-c).

In Comsol you may use the flux boundary condition with;

cb= your dirichlet condition,

kc >> 1 if t<t1,
kc=0 if t>t1.

In the first case, when kc is large enough, c-cb -> 0, ie c~cb,
in the second case dc/dx=0.

You may introduce the discontinuity using logical features ( ie <= or >) or Comsol smoothed
Heaviside function like flc1hs and so on or usual functions like tanh.

The value to use for kc when t<t1 may depend on various parameter of your problem. So
you have to try increasing values, for exemple 1,10,100,1000 etc.. Please notice that
using very large value may cause some instability in the solution ( jumping from 0 to infinity
in one time step is not a good idea). So you may limit the value in order to obtain a correct
approximation of c=cb)

Regards.

J.M
Hi Gabrielle, The simplest way is probably to use the convective boundary condition ( 3rd kind condition) witch is something like: dc/dx= h*(cb-c). In Comsol you may use the flux boundary condition with; cb= your dirichlet condition, kc >> 1 if tt1. In the first case, when kc is large enough, c-cb -> 0, ie c~cb, in the second case dc/dx=0. You may introduce the discontinuity using logical features ( ie ) or Comsol smoothed Heaviside function like flc1hs and so on or usual functions like tanh. The value to use for kc when t

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 23 oct. 2013, 12:26 UTC−4
Hello,

I'm trying to apply a heat flux using Neumann boundary condition, but It's not working.

I'm trying to input a constant heat flux in the energy equation, for example.

-n(Gamma)=g where g=41000[W/m^2] for 0<t<ts
and
-n(Gamma)=g where g=0 for t>ts.

I tried to use a piecewise function where for 0<t<ts -n(Gamma)=g where g=41000[W/m^2]
for t>ts -n(Gamma)=g=0.
Do you know if I'm doing something wrong about this implementation?

Thanks.

Marco
Hello, I'm trying to apply a heat flux using Neumann boundary condition, but It's not working. I'm trying to input a constant heat flux in the energy equation, for example. -n(Gamma)=g where g=41000[W/m^2] for 0

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.