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.

Accessing the displacement value of a particular point or boundary.

Please login with a confirmed email address before reporting spam

Hello,

I need to access the vertical displacement of a particular boundary in my axi-symmetric model and use that value to multiply with a constant number as the model is being solved.
What variable do I use to get the vertical displacement of a particular boundary?

For example, if i want the displacement value of the boundary 4, do I use something like w(4)?

Thanks,
Aseem

6 Replies Last Post 2012年4月9日 GMT-4 03:02
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 2011年3月1日 GMT-5 09:59
Hi

learn the internal variables and their meaning (see the doc) the displacement is (u,v,w) along (x,y,z) or along (r,phi,z) and do not forget that r is along the horizontal view axis (usually called x) and z is along the vertical axis (usually called y) Do not mix this up ;)

So if you have a boundary you want to track, you need to know its u,v,w value (or any combination depending on the direction you need.

But u,v,w are functions of the coordinates (the are defined locally and vary over the entities). you either need to define a single "point" where you can measure it, or you average over a boundary (=edge) in 2D axi or over a domain (=surface in 2D-axi)

To get a global value you need i.e to calculate the "global" average displacement via an integration coupling variable. But this means doing:

MyU = int_over_BC_of "w" *ds

(w is if you are measuring in the Z direction, and "ds" is the edge length integrand, defined internally in COMSOL in the direction of the arrow you see in boundary/edge view, the ds is implicit)

This gives you a dimension of m^2 so you need to normalize it to get an average value out, typically you calculate the edge length by another integration coupling variable

MyLength = int_over_edge_of "1".

Then you define a variable for the displacement

MyDisp = MyU / MyLength

MyDisp is now a global "average displacement" variable having a clear definition for all times and any location

--
Good luck
Ivar
Hi learn the internal variables and their meaning (see the doc) the displacement is (u,v,w) along (x,y,z) or along (r,phi,z) and do not forget that r is along the horizontal view axis (usually called x) and z is along the vertical axis (usually called y) Do not mix this up ;) So if you have a boundary you want to track, you need to know its u,v,w value (or any combination depending on the direction you need. But u,v,w are functions of the coordinates (the are defined locally and vary over the entities). you either need to define a single "point" where you can measure it, or you average over a boundary (=edge) in 2D axi or over a domain (=surface in 2D-axi) To get a global value you need i.e to calculate the "global" average displacement via an integration coupling variable. But this means doing: MyU = int_over_BC_of "w" *ds (w is if you are measuring in the Z direction, and "ds" is the edge length integrand, defined internally in COMSOL in the direction of the arrow you see in boundary/edge view, the ds is implicit) This gives you a dimension of m^2 so you need to normalize it to get an average value out, typically you calculate the edge length by another integration coupling variable MyLength = int_over_edge_of "1". Then you define a variable for the displacement MyDisp = MyU / MyLength MyDisp is now a global "average displacement" variable having a clear definition for all times and any location -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年3月2日 GMT-5 06:23
I can define a point (by its co-ordinates) and then measure it. But I do not want to do this while post processing.

I want to define a spring force (spring_constant*displacement). So that would vary as the displacement changes as the model is being solved.

So, what I want to do is to be able to specify something like F_z = -k*w.... (where w is the vertical displacement and k is the spring constant) as the boundary force in boundary settings.

If its easier to extract the point displacement while the model is being solved and put that value in the boundary force, is there a simpler way I can use a variable for this?

Thanks

I can define a point (by its co-ordinates) and then measure it. But I do not want to do this while post processing. I want to define a spring force (spring_constant*displacement). So that would vary as the displacement changes as the model is being solved. So, what I want to do is to be able to specify something like F_z = -k*w.... (where w is the vertical displacement and k is the spring constant) as the boundary force in boundary settings. If its easier to extract the point displacement while the model is being solved and put that value in the boundary force, is there a simpler way I can use a variable for this? 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 2011年3月2日 GMT-5 07:18
Hi

Exactly, then you write on a boundary force BC exactly that Fz[N] = -K[N/m]*w

But then you have a little unit issue, forces are given in pressure over an area, so you must calculate once the area and divide the spring stiffness by the area, you can do it with a constant or a integration coupling variable.

In V4 you can choose between total (average over area) force or distributed pressure

OK one thing to say: when you are asking for the displacement of a point you should understand the following:

(u,v,w) are not a given value but each components are a function of the spatial variables (x,y,z) (or r,phi,z ...) so when you write "u" in a formula field of COMSOL you are in fact writing u(x,y,z) and you need someway to define the (x,y,z), for an integration coupling variable its the integration of

integration_over_domain_or_boundary_of u(x,y,z) *dx*dy*dz

The value above, if divided by the volume or surface, gives you the integrated AVERAGE displacement of your boundary or domain

so by writing "u" in a formula you consider all points (mesh nodes or elements) applicable to the specific field you are writing into. This domain or boundary are defined by the selected entities for the Domain or Boundary node.

Hope I make myself understood ;)

--
Good luck
Ivar
Hi Exactly, then you write on a boundary force BC exactly that Fz[N] = -K[N/m]*w But then you have a little unit issue, forces are given in pressure over an area, so you must calculate once the area and divide the spring stiffness by the area, you can do it with a constant or a integration coupling variable. In V4 you can choose between total (average over area) force or distributed pressure OK one thing to say: when you are asking for the displacement of a point you should understand the following: (u,v,w) are not a given value but each components are a function of the spatial variables (x,y,z) (or r,phi,z ...) so when you write "u" in a formula field of COMSOL you are in fact writing u(x,y,z) and you need someway to define the (x,y,z), for an integration coupling variable its the integration of integration_over_domain_or_boundary_of u(x,y,z) *dx*dy*dz The value above, if divided by the volume or surface, gives you the integrated AVERAGE displacement of your boundary or domain so by writing "u" in a formula you consider all points (mesh nodes or elements) applicable to the specific field you are writing into. This domain or boundary are defined by the selected entities for the Domain or Boundary node. Hope I make myself understood ;) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年3月2日 GMT-5 12:03
So, if I write Fz = (k * w)/area in the Fz area for a boundary (say boundary 1) using the boundary settings, w is the average vertical displacement for that boundary?

Am I right in saying that?

Thanks
So, if I write Fz = (k * w)/area in the Fz area for a boundary (say boundary 1) using the boundary settings, w is the average vertical displacement for that boundary? Am I right in saying that? 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 2011年3月2日 GMT-5 12:51
Hi


no not the average, the local displacement at each node and mesh considered over the domain or the boundary (or edge or points) you have selected

To get the average diaplacement you must average w over a domain/boundary/edge or Points, and average means integration over (= sum) and divide by volume, respective area length or number of points.

just write out the equation of an average when dealing with continuous functions

These are essential concepts to understand if you want to use COMSOL extensively, particularyl the "implicit" notation of COMSOL

--
Good luck
Ivar
Hi no not the average, the local displacement at each node and mesh considered over the domain or the boundary (or edge or points) you have selected To get the average diaplacement you must average w over a domain/boundary/edge or Points, and average means integration over (= sum) and divide by volume, respective area length or number of points. just write out the equation of an average when dealing with continuous functions These are essential concepts to understand if you want to use COMSOL extensively, particularyl the "implicit" notation of COMSOL -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年4月9日 GMT-4 03:02
Hi,

I am trying to model a composite and I have similar problems and your help would be much appreciated. I have a similar issue where I would like to enforce periodic boundary conditions between two boundaries excluding the first node and would like to add the value of the displacement first node to it. Is it possible to 1) specify these conditions only for specific nodes rather than the whole boundary and 2) use the displacement at a point as a variable within the model?

Thanks.

Best
Lakshmi.
Hi, I am trying to model a composite and I have similar problems and your help would be much appreciated. I have a similar issue where I would like to enforce periodic boundary conditions between two boundaries excluding the first node and would like to add the value of the displacement first node to it. Is it possible to 1) specify these conditions only for specific nodes rather than the whole boundary and 2) use the displacement at a point as a variable within the model? Thanks. Best Lakshmi.

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.