# How to solve this coefficient form PDE in OpenFOAM?

 Register Blogs Members List Search Today's Posts Mark Forums Read

 January 16, 2020, 02:47 How to solve this coefficient form PDE in OpenFOAM? #1 New Member   Join Date: Jan 2020 Posts: 2 Rep Power: 0 Hi all, I am new to working with OpenFOAM and am trying to recreate a COMSOL solution for a coefficient form PDE with OpenFOAM. The equation is: Code: `div(gamma-grad(u))==0` where u is a scalar that depends on x,y,z and gamma is a constant vector. I have looked through the existing solvers in OpenFOAM, but could not find one that fits this equation. So my question is: Can this equation be solved in OpenFOAM with an existing solver or would I have to implement a new solver for this? Regards, Lukas

January 16, 2020, 05:48
#2
Senior Member

Santiago Lopez Castano
Join Date: Nov 2012
Posts: 282
Rep Power: 10
Quote:
 Originally Posted by lupe123 Hi all, I am new to working with OpenFOAM and am trying to recreate a COMSOL solution for a coefficient form PDE with OpenFOAM. The equation is: Code: `div(gamma-grad(u))==0` where u is a scalar that depends on x,y,z and gamma is a constant vector. I have looked through the existing solvers in OpenFOAM, but could not find one that fits this equation. So my question is: Can this equation be solved in OpenFOAM with an existing solver or would I have to implement a new solver for this? Regards, Lukas
If gamma is a constant vector, Wouldn't your PDE reduce just to -div(grad(u)) = 0?
Or did you meant gamma = gamma(x,y,z) constant?

 January 16, 2020, 07:16 #3 New Member   Join Date: Jan 2020 Posts: 2 Rep Power: 0 Hi Santiago, Thanks for the reply. I meant gamma = gamma(x,y,z) constant. In COMSOL this is called conservative flux source.