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 to define a variable for a range of values?

Mohammed Abdul Qadeer Siddiqui

Please login with a confirmed email address before reporting spam

Hi,

I am trying to simulate a spontaneous fluid uptake process in a rock where capillary pressure is the driving force. I am using Coefficient Form PDE physics. In such a case, only damping coefficient and source term are non-zero. The source term (f) is -d(d(Pc,x),x). Here, I would like to define Pc as a variable under Global Definitions wherein for its expression I want to write 2*sigma/r.

However, Pc is different for different values of r. My question is how can I incorporate this in COMSOL? How do I define Pc as something that varies for a range of 'r' values. At different Pc values, subsequent variables are also calculated such as Se, krw, etc.

I would appreciate your help in setting up this problem in COMSOL.

Thanks


1 Reply Last Post 21 janv. 2020, 06:30 UTC−5
Michael Rembe Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 5 years ago 21 janv. 2020, 06:30 UTC−5

Hi Mohammed, I don't understand what you want to simulate! Usually the richard's equation (for example) is solved for the capillary pressure pc and the velocities u, v, w are results of d(Pc,x), d(Pc,y) and d(Pc,z). If you want to define pc=2sigma/r you can do it as a local variable of your 2d axisymmetrical geometry (comp1) but not as a global variable.

Best regards Michael Rembe

-------------------
Michael Rembe
Rembe Consulting PartG mbB
www.rembe-consulting.de


Hi Mohammed, I don't understand what you want to simulate! Usually the richard's equation (for example) is solved for the capillary pressure pc and the velocities u, v, w are results of d(Pc,x), d(Pc,y) and d(Pc,z). If you want to define *pc=2sigma/r* you can do it as a local variable of your 2d axisymmetrical geometry (comp1) but not as a global variable. Best regards Michael Rembe

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.