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
17 mars 2011, 16:18 UTC−4
Hi velocity field ?
what do you really mean by 3D and 2D velocity profiles ?,
is it that you are missing a cylindrical coordinates to define the velocity field along "r" or sys2.r for the first coordinate (if you add a first cylindrical coordinate ) ?
--
Good luck
Ivar
Hi velocity field ?
what do you really mean by 3D and 2D velocity profiles ?,
is it that you are missing a cylindrical coordinates to define the velocity field along "r" or sys2.r for the first coordinate (if you add a first cylindrical coordinate ) ?
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
18 mars 2011, 04:32 UTC−4
Thank you very much for your reply, Ivar. I know that you are always so kind !
Cylindrial coordinates? It could be used to define the velocity field along "r"? But then the velocity field defined in convection-diffusion is an averaged or the maximum one? I think I should make it more clear with my case.
I start from a 2D laminar flow in a tube (e.g. x-z axis). The aim is to simulate the transport of chemicals in a parobolic velocity profile across the section of the tube. With COMSOL 4.1 the chemical module, the convection-diffusion could model chemical transportation in velocities of three dimensions, but in each direction, the value of the velocity is an averaged and constant one, right? I want a simulation of user-defined varied velocity scalars in the same x direction, Vx (Z) (e.g. the parobolic velocity function). Of course the same convection-diffusion functions used in COMSOL, but does it involve subroutine for the case I required? Or if is possible to incorporate your own sub-code to specify a varied velocity value in the same direction?
And by the way, could this module determine a flux injection time? As I see, the inflow concentration is injected until the last of the transportation time. Could the inflow (simulating injection) time be a certain given time period? Thank you.
Yuexia
Thank you very much for your reply, Ivar. I know that you are always so kind !
Cylindrial coordinates? It could be used to define the velocity field along "r"? But then the velocity field defined in convection-diffusion is an averaged or the maximum one? I think I should make it more clear with my case.
I start from a 2D laminar flow in a tube (e.g. x-z axis). The aim is to simulate the transport of chemicals in a parobolic velocity profile across the section of the tube. With COMSOL 4.1 the chemical module, the convection-diffusion could model chemical transportation in velocities of three dimensions, but in each direction, the value of the velocity is an averaged and constant one, right? I want a simulation of user-defined varied velocity scalars in the same x direction, Vx (Z) (e.g. the parobolic velocity function). Of course the same convection-diffusion functions used in COMSOL, but does it involve subroutine for the case I required? Or if is possible to incorporate your own sub-code to specify a varied velocity value in the same direction?
And by the way, could this module determine a flux injection time? As I see, the inflow concentration is injected until the last of the transportation time. Could the inflow (simulating injection) time be a certain given time period? Thank you.
Yuexia
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
18 mars 2011, 09:22 UTC−4
Hi
you are right that the User defined CHDS Convection and Diffusion Model Inputs Velocity field input is lacking a coordinate reference other than the default cartesian (A SUGGESTION FOR IMPROVEMENTS FOR COMSOL HERE ;)
By changing User defined to another physics it will link in correctly. This means that you must use the coordinate transform items manually. you can always define a cylindrical coordinate transform and then extract the term and multiply by hand
another way, is to use the "s" variable defined on 2D edges (limited to 2D), i.e. along tube in X direction you add a velocity of
x component = V0*6*s(1-s)
y component = 0
where "s" is the edge variable going from 0 to 1 long the edge in the direction of the arrow (normal "up" to the left of the traveling direction, hence with anti-clock rotations respected) and v0 is the average velocity as the integration from 0 to 1 of 6*V0*s*(1-s) = V0, use 4 instead of 6 if V0 is the maximum velocity
For 3D you must define a "r" to replace "s" i.e. a flow along Z perpendicular to the plane X-Y, r=sqrt(x^2+y^2)/R0 where R0 is the tube diameter. Note that depending on the frame used (physics dependent) you might want to use upper case X and Y
Then for transient solver, you could define a V0(t), just use a smooth function, i.e. a Heaviside step functions or pulse functions, these are already pre-cooked in the Definitions Functions, take a look
--
Good luck
Ivar
Hi
you are right that the User defined CHDS Convection and Diffusion Model Inputs Velocity field input is lacking a coordinate reference other than the default cartesian (A SUGGESTION FOR IMPROVEMENTS FOR COMSOL HERE ;)
By changing User defined to another physics it will link in correctly. This means that you must use the coordinate transform items manually. you can always define a cylindrical coordinate transform and then extract the term and multiply by hand
another way, is to use the "s" variable defined on 2D edges (limited to 2D), i.e. along tube in X direction you add a velocity of
x component = V0*6*s(1-s)
y component = 0
where "s" is the edge variable going from 0 to 1 long the edge in the direction of the arrow (normal "up" to the left of the traveling direction, hence with anti-clock rotations respected) and v0 is the average velocity as the integration from 0 to 1 of 6*V0*s*(1-s) = V0, use 4 instead of 6 if V0 is the maximum velocity
For 3D you must define a "r" to replace "s" i.e. a flow along Z perpendicular to the plane X-Y, r=sqrt(x^2+y^2)/R0 where R0 is the tube diameter. Note that depending on the frame used (physics dependent) you might want to use upper case X and Y
Then for transient solver, you could define a V0(t), just use a smooth function, i.e. a Heaviside step functions or pulse functions, these are already pre-cooked in the Definitions Functions, take a look
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
21 mars 2011, 06:41 UTC−4
Hello Ivar
I tried it out the chds with the spf two physics coupled together as you suggested. And the other alternative of user-defined velocity field is also quite helpful for other conditions.
But for the transient solver, I still don't know whether I tried in the right way. For example, I chose a rectangle inpulse function (rect1), and add a Modal solver-Timedependent-Variables (Concentration), and in the Eigenpairs, I am not sure that the Mode was correctly specified (I just edit rect1). Because I would like to see an inpulse of chemical influx (e.g. constanst input concentration during 10s). But unfortunately I got error always. Could you please kindly point me out the problem? I am quite a beginner of COMSOL. But I really appreciate it for helping on numerical calculation before I start my experiments.
Thank you very much! Ivar.
Yuexia
Hello Ivar
I tried it out the chds with the spf two physics coupled together as you suggested. And the other alternative of user-defined velocity field is also quite helpful for other conditions.
But for the transient solver, I still don't know whether I tried in the right way. For example, I chose a rectangle inpulse function (rect1), and add a Modal solver-Timedependent-Variables (Concentration), and in the Eigenpairs, I am not sure that the Mode was correctly specified (I just edit rect1). Because I would like to see an inpulse of chemical influx (e.g. constanst input concentration during 10s). But unfortunately I got error always. Could you please kindly point me out the problem? I am quite a beginner of COMSOL. But I really appreciate it for helping on numerical calculation before I start my experiments.
Thank you very much! Ivar.
Yuexia