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.
how many boundary condition should be imposed on spatially first order differential equation in comsol?
Posted 23.01.2015, 11:44 GMT-5 Modeling Tools & Definitions, Parameters, Variables, & Functions, Studies & Solvers Version 4.4 8 Replies
Please login with a confirmed email address before reporting spam
du/dx =u
x in [0,2]
u(0) = 1000
while I was using the General Form PDE in stationary , there are two boundary point in x=0 and x=2.
the default condition is zero flux condition at both ends. However, for a 1st order equation there should be only one boundary condition. zero flux at x = 2 is over-determinant for this problem.
The results obtained is also oscillating as shown in the attachment.
So, my question is: what condition should I impose at x=2? for this kind of equation?
Attachments:
Please login with a confirmed email address before reporting spam
Your question is more like calculus than FEM problem. Of course you are right, the solution is in closed form
u(x) = 1000*exp(x)
and boundary condition u(2) is overkilling. But if the problem were
du/dx = k*u
the solution would be
u(x) = 1000*exp(k*x)
and, e.g., a boundary condition u(2) = b would require that k =½*ln(b/1000); zero flux condition is not possible, neither u(2) = 0.
Lasse
Please login with a confirmed email address before reporting spam
I am not sure if using COMSOL to solve parabolic equation is a right choice.
Please login with a confirmed email address before reporting spam
I do not quite understand your question. What do you mean by a complex ODE? Heat transfer and diffusion equations are examples of a parabolic PDEs which are solved with Comsol in several physics. Boundary conditions depend on your physical situation. Your original equation was a first order ODE, and only one BC is needed.
br
Lasse
Please login with a confirmed email address before reporting spam
Your previous solution is to solve the ODE first, and set the BC at another end using the correct value. I think it is a kind of cheating, right? If I can solve the ODE, why I have to set the BC?
Please login with a confirmed email address before reporting spam
br
Lasse
Please login with a confirmed email address before reporting spam
u: velocity of gas, unknown
cf: 0.003, Darcy friction factor
qm: mass flow rate, qm(x) is known
A: area, A(x) is measured
Cw: wetting perimeter, Cw(x) is known
x: axial distance. 0<=x<=2
p: pressure, p(x) is measured
du/dx = -A/qm*(dp/dx) - cf*u/2/A*Cw - u/qm*(dqm/dx)
u(0) = u0
This is the equation I need to solve. What is the BC at x=2?
I do not have second BC for my problem, I did not set the second BC either. But the comsol set it for me automatically.
It seems that comsol cannot be used to solve IVP in 1d space.
Please login with a confirmed email address before reporting spam
br
Lasse
Please login with a confirmed email address before reporting spam
I think the problem is the default behavior of comsol. It impose a default B.C. for 1d-ODE at unspecified end, which make the equation over-determined. I do not know what happend next, but I can still produce a result to meet the over-determined ode.
The general form of PDE in comsol includes d^2u/dx^2 terms, which means it is designed to solve 2nd PDE. I think comsol should have some limit on the coeff. of general form of PDE, or illegal BC will cause misleading and confusing results.
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.
Suggested Content
- KNOWLEDGE BASE Understanding, and changing, the element order
 - FORUM Follow up on your query on "How Many Boundary Condition Should Be Imposed On Spatially First Order Differential Equation In Comsol?"
 - BLOG Maximizing Eigenfrequencies with Shape and Topology Optimization
 - FORUM First order differential as a boundary
 - KNOWLEDGE BASE Avoiding Negative Concentrations
 
