Please login with a confirmed email address before reporting spam
Posted:
10 years ago
24 janv. 2015, 07:49 UTC−5
Hi
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
Hi
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
Posted:
10 years ago
3 févr. 2015, 23:00 UTC−5
So, If the ODE is very complex, what B.C. should I impose at x=2?
I am not sure if using COMSOL to solve parabolic equation is a right choice.
So, If the ODE is very complex, what B.C. should I impose at x=2?
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
Posted:
10 years ago
4 févr. 2015, 05:23 UTC−5
Hi
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
Hi
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
Posted:
10 years ago
4 févr. 2015, 22:34 UTC−5
I mean mathematically, I cannot solve a 1st order ODE with two BCs. right? But in comsol, I cannot just set one BC during setting the problem. If I do not set BC at x = x_end, the system will impose a default BC for me. This will cause a mathematical fallacy. And the result is also wrong.
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?
I mean mathematically, I cannot solve a 1st order ODE with two BCs. right? But in comsol, I cannot just set one BC during setting the problem. If I do not set BC at x = x_end, the system will impose a default BC for me. This will cause a mathematical fallacy. And the result is also wrong.
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
Posted:
10 years ago
5 févr. 2015, 01:34 UTC−5
What is the physics behind your equation? Google a two point boundary value problem, and you'll see that there are no first order ODEs. You are trying to do something unphysical.
br
Lasse
What is the physics behind your equation? Google a two point boundary value problem, and you'll see that there are no first order ODEs. You are trying to do something unphysical.
br
Lasse
Please login with a confirmed email address before reporting spam
Posted:
10 years ago
6 févr. 2015, 03:19 UTC−5
It is a simple quasi-1d compressible flow equation of motion with known pressure distribution and friction factor
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.
It is a simple quasi-1d compressible flow equation of motion with known pressure distribution and friction factor
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
Please login with a confirmed email address before reporting spam
Posted:
10 years ago
6 févr. 2015, 04:32 UTC−5
This is entirely different problem from that you initially disclosed, as you do not have constant coefficients. Still, only one BC should suffice, it is not question of the dimension. If all the variables depending on x can be expressed with closed form functions, I would use Matlab's Runge-Kutta algorithm. If the variables are given as a table of values and interpolation between the measured points must be used, I have no experience of doing that in Comsol, I am sorry.
br
Lasse
This is entirely different problem from that you initially disclosed, as you do not have constant coefficients. Still, only one BC should suffice, it is not question of the dimension. If all the variables depending on x can be expressed with closed form functions, I would use Matlab's Runge-Kutta algorithm. If the variables are given as a table of values and interpolation between the measured points must be used, I have no experience of doing that in Comsol, I am sorry.
br
Lasse
Please login with a confirmed email address before reporting spam
Posted:
10 years ago
7 févr. 2015, 02:56 UTC−5
I think they are the same problem. du/dx = f(u,x;p), p is given parameters including spline coeff.s to fit with experiment data, which is pre-defined before ODE solver runs. It does not matter whether the coeff.s are constants or varies with x. I used python odeint in scipy to solve this. constant friction coeff. is not a problem.
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.
I think they are the same problem. du/dx = f(u,x;p), p is given parameters including spline coeff.s to fit with experiment data, which is pre-defined before ODE solver runs. It does not matter whether the coeff.s are constants or varies with x. I used python odeint in scipy to solve this. constant friction coeff. is not a problem.
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.