Hi
well if you vertical "tube" has an axis along "y" (in 2D adapt for x&z in 3D) then try an initial value of the pressure :
p = p0 * ( y - y0 ) / Length
where "p0" is the maximum pressure at the inlet. "Length" is the tube length from input to output, and "y0" is the coordinate height of the inlet location (I believe that is correct)
Note: the input pressure is the total pressure, before it included also the extra tube length you added to get the developed laminar flow, I believe it's still so, check carefully in the doc
For the inlet velocity in 2D, if you so not use the predefined laminar flow build-up, you can define an inlet velocity as
v0 * 4 * s * ( 1 - s )
where v0 is the maximum velocity (mean velocity = 2/3*v0) and s is the edge length that by default in COMSOL 2D goes from 0 to 1 "along the arrow" of each 2D edge (more complex in 3D). But this is only valid on the input edge, if you want to apply it to the full tube length: again for a vertical tube with flow parallel to "y" axis, in 2D)
v0 * 4 * ( x - XL ) * ( XR - x ) / ( XR - XL )^2
where v0 is the maximum velocity, XL, XR respectively the left and right coordinates of your inlet cross section, or something close to the average tube section for a non straight tube (again I hope I typed this right pls check carefully as I haven't checked myself, and I'm not behind my PC ;)
thislast formula is valid for the full height ("for all y") of your 2D domain, with the risk you get negative flow if the total width is larger, somewhere, than (XR-XL)
--
Good luck
Ivar
well if you vertical "tube" has an axis along "y" (in 2D adapt for x&z in 3D) then try an initial value of the pressure :
p = p0 * ( y - y0 ) / Length
where "p0" is the maximum pressure at the inlet. "Length" is the tube length from input to output, and "y0" is the coordinate height of the inlet location (I believe that is correct)
Note: the input pressure is the total pressure, before it included also the extra tube length you added to get the developed laminar flow, I believe it's still so, check carefully in the doc
For the inlet velocity in 2D, if you so not use the predefined laminar flow build-up, you can define an inlet velocity as
v0 * 4 * s * ( 1 - s )
where v0 is the maximum velocity (mean velocity = 2/3*v0) and s is the edge length that by default in COMSOL 2D goes from 0 to 1 "along the arrow" of each 2D edge (more complex in 3D). But this is only valid on the input edge, if you want to apply it to the full tube length: again for a vertical tube with flow parallel to "y" axis, in 2D)
v0 * 4 * ( x - XL ) * ( XR - x ) / ( XR - XL )^2
where v0 is the maximum velocity, XL, XR respectively the left and right coordinates of your inlet cross section, or something close to the average tube section for a non straight tube (again I hope I typed this right pls check carefully as I haven't checked myself, and I'm not behind my PC ;)
thislast formula is valid for the full height ("for all y") of your 2D domain, with the risk you get negative flow if the total width is larger, somewhere, than (XR-XL)
--
Good luck
Ivar