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.

Integration Coupling Variables

Please login with a confirmed email address before reporting spam

Hi

I've been trying to make use of these potentially very powerful tools, but I've been having some issues.

Namely, I want to specify a boundary condition that simply matches what's going on in the domain for a particular variable. I've done the best I can with the information I've gleaned from the guides as well as these discussion forums and I can't see what I'm doing wrong.

I'm working on a transient analysis 2D multiphysics geometry with the Moving Mesh (ale) and Incompressible Navier-Stokes (ns) application modes, but I think the issue is more general than these specific modes.

I've defined an integration coupling variable over the subdomain: Name "B"; Expression "p" (pressure, right?); Integration order "4" (default); Frame "ale" (since I want it to change as the mesh deforms). I de-selected the "global" option, and instead I've specified it on the relevant boundary.
I've defined another Integration coupling variable, this time on the relevant boundary: Name "A"; Expression "1". The other options I've specified as the same for the variable B.

As far as I understand it, the units for B should be Newtons [N] and variable A should be an area [m^2].
But, when I specify a boundary expression (on the boundary to which I sent the variables A and B):
Pr = B/A,
it tells me that I have "inconsistent units".
What am I doing wrong?

5 Replies Last Post 11.03.2011, 15:46 GMT-5
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 04.03.2011, 14:33 GMT-5
Hi

In v3.5/3.5a the units do not pass correctly via the integration coupling variables so you must add them manually, read an 2D integration coupling variable as the units of the operand * [m^2] or [m^3] in 3D respectively (you integrate over dx*dy, or dx*dy*dz respectively (and only [m] for dx in 1D)

just as, even for v4.1, functions want unitless inputs and are unitless on output (that is supposed to change in a future release.)

So if you integrate the pressure you end up with Pa*m^2=N a force which is normal, so to get the average perssure over the desired area you must divide this integrated pressure by the Area to get back Pa. (in v4 you have the average() operator that takes care of the division by the area (respective volume or length) for you, but not in v3.5a.

however in v3.5a you need to add the units so you need to write:

Pr = (B/A)[Pa]

Take also care with the division"/" and the units in 3.5a write systematically B[N]/(A[m^2]) to get [N/m^2=Pa] because in v3.5 B[N]/A[m^2] gives you (B/A)[N*m^2) the division is NOT ported to the units !!

Other place where dimansions do not pass in v3.5: fractional powers or sqrt(), these you must control also manually. If you integrate on linear , 2nd or 4th order its a question of the type of integration and the relative error you get (or expect from the overall shape, but here again with a coarse mesh and a varying gradient you might be better with a lower order, to avoid ripples and overshoot.

--
Good luck
Ivar
Hi In v3.5/3.5a the units do not pass correctly via the integration coupling variables so you must add them manually, read an 2D integration coupling variable as the units of the operand * [m^2] or [m^3] in 3D respectively (you integrate over dx*dy, or dx*dy*dz respectively (and only [m] for dx in 1D) just as, even for v4.1, functions want unitless inputs and are unitless on output (that is supposed to change in a future release.) So if you integrate the pressure you end up with Pa*m^2=N a force which is normal, so to get the average perssure over the desired area you must divide this integrated pressure by the Area to get back Pa. (in v4 you have the average() operator that takes care of the division by the area (respective volume or length) for you, but not in v3.5a. however in v3.5a you need to add the units so you need to write: Pr = (B/A)[Pa] Take also care with the division"/" and the units in 3.5a write systematically B[N]/(A[m^2]) to get [N/m^2=Pa] because in v3.5 B[N]/A[m^2] gives you (B/A)[N*m^2) the division is NOT ported to the units !! Other place where dimansions do not pass in v3.5: fractional powers or sqrt(), these you must control also manually. If you integrate on linear , 2nd or 4th order its a question of the type of integration and the relative error you get (or expect from the overall shape, but here again with a coarse mesh and a varying gradient you might be better with a lower order, to avoid ripples and overshoot. -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 07.03.2011, 05:27 GMT-5
Hi Ivar, thanks again for your time.

I've understood your points on how to remedy the problem, as quoted below.


however in v3.5a you need to add the units so you need to write:

Pr = (B/A)[Pa]

Take also care with the division"/" and the units in 3.5a write systematically B[N]/(A[m^2]) to get [N/m^2=Pa] because in v3.5 B[N]/A[m^2] gives you (B/A)[N*m^2) the division is NOT ported to the units !!


Unfortunately, they don't appear to solve the issue. I still get the message telling me about inconsistent units, despite trying both unit input methods you detail above as well as various combinations thereof. I don't know if you can offer any other advice, but if you could give it one last look I'd appreciate it.

Thanks.
Hi Ivar, thanks again for your time. I've understood your points on how to remedy the problem, as quoted below. [QUOTE] however in v3.5a you need to add the units so you need to write: Pr = (B/A)[Pa] Take also care with the division"/" and the units in 3.5a write systematically B[N]/(A[m^2]) to get [N/m^2=Pa] because in v3.5 B[N]/A[m^2] gives you (B/A)[N*m^2) the division is NOT ported to the units !! [/QUOTE] Unfortunately, they don't appear to solve the issue. I still get the message telling me about inconsistent units, despite trying both unit input methods you detail above as well as various combinations thereof. I don't know if you can offer any other advice, but if you could give it one last look I'd appreciate it. Thanks.

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 07.03.2011, 05:55 GMT-5
Hi

in the worst case, just ignore the units warning, it will not stop solving,

but you must be sure you you really understand and that the units you believe you use are really correct.
The units "transport through the GUI", in 3.5a, was not "perfect" much better in v4, but still a few weaknesses ;)

--
Good luck
Ivar
Hi in the worst case, just ignore the units warning, it will not stop solving, but you must be sure you you really understand and that the units you believe you use are really correct. The units "transport through the GUI", in 3.5a, was not "perfect" much better in v4, but still a few weaknesses ;) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 11.03.2011, 11:38 GMT-5
Bonjour

Je travail sur la version 4.0a et je ne sais pas comment je peut avoir un accé à Integration Coupling Variables dans cette version option qui se trouve dans les ancien version.

otmanebekkaoui
Bonjour Je travail sur la version 4.0a et je ne sais pas comment je peut avoir un accé à Integration Coupling Variables dans cette version option qui se trouve dans les ancien version. otmanebekkaoui

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 11.03.2011, 15:46 GMT-5
Hi

You will fint it in the Definition Node (top part) under integration (here you define an operator (function) that you call later in the programme

--
Good luck
Ivar
Hi You will fint it in the Definition Node (top part) under integration (here you define an operator (function) that you call later in the programme -- Good luck Ivar

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.