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.

Initial condition change

Please login with a confirmed email address before reporting spam

In v4.0, I used general form pde and moving mesh interfaces to solve a 1D diffusion equation with a constant surface concentration. The left boundary represent the surface. The boundary conditions are Dirichlet type, 500mol/m^3 at surface and zero at the right boundary. When the moving mesh (ALE) was not added, I can set up a very narrow Gaussian initial profile at the lower boundary. I checked it with "Compute to Selected" under "Solver/Variables". But after I added moving mesh, the initial condition changed to the value of surface concentration across the simulation domain. I don't know if you have heard about this.

5 Replies Last Post Apr 15, 2014, 6:39 p.m. EDT

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jun 7, 2011, 4:39 p.m. EDT
What's your expression for the initial value? If it's a function respect with the space coordinate, you should use capital letter instead of lowercase one when ale is involved. For example, init (X), not init(x)
What's your expression for the initial value? If it's a function respect with the space coordinate, you should use capital letter instead of lowercase one when ale is involved. For example, init (X), not init(x)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jun 8, 2011, 2:32 p.m. EDT
Amazing! It works. Thanks a lot. But may I ask why?
Amazing! It works. Thanks a lot. But may I ask why?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jun 8, 2011, 2:32 p.m. EDT
Is it mentioned somewhere in the manual? Do I have to use upper cases of coordinates in boundary conditions, governing equations, or the moving velocity of ALE?
Is it mentioned somewhere in the manual? Do I have to use upper cases of coordinates in boundary conditions, governing equations, or the moving velocity of ALE?

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jun 9, 2011, 3:55 a.m. EDT
Hi

check the doc about "Frames" that is important to catch the subtle differences, otherwise you will have "great" suprises ;)

in v4 you have basicall "spatial", "material" and "mesh" Frames.
They start all overlapped and accessed by a lower case x,y,z.

Then depending on the physics they "split" hence upper and lower cases (lower case for spatial, upper case for material and mesh,

with ALE the mesh splits off too, hence x,y,z and X,Y,Z, and Xm,Ym...

--
Good luck
Ivar
Hi check the doc about "Frames" that is important to catch the subtle differences, otherwise you will have "great" suprises ;) in v4 you have basicall "spatial", "material" and "mesh" Frames. They start all overlapped and accessed by a lower case x,y,z. Then depending on the physics they "split" hence upper and lower cases (lower case for spatial, upper case for material and mesh, with ALE the mesh splits off too, hence x,y,z and X,Y,Z, and Xm,Ym... -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 15, 2014, 6:39 p.m. EDT
hello,

does a init(r,z) also work in a 2D axisym problem?
or should it be a init(R,Z) definition?

init(x,y) is well plotted in the function definition, but I am not able to use it as initial values of my domain.


lukas

found the problem... meters and millimeters init(r*1000,z*1000) did it.
hello, does a init(r,z) also work in a 2D axisym problem? or should it be a init(R,Z) definition? init(x,y) is well plotted in the function definition, but I am not able to use it as initial values of my domain. lukas found the problem... meters and millimeters init(r*1000,z*1000) did it.

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.