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.
divergence, rotational and cylindrical coordinate.
Posted 2011年6月3日 GMT-4 05:36 Computational Fluid Dynamics (CFD) Version 4.2 28 Replies
Please login with a confirmed email address before reporting spam
I have read in the Multiphysics Users Guide that:
"In practice, this means that to correctly implement equations containing the gradient, divergence, or curl in an axisymmetric geometry, you need to compensate for the missing terms related to the curvature of the coordinate system."
And a few lines below:
"Note: The axisymmetric versions of physics interfaces take the cylindrical system into
account, and no compensation is therefore needed."
So, my question is: if I use a 2D axisymmetric model, should I compensate or not the missing terms if we use divergence or rotational operator?
Thank-you very much in advance.
Best regards,
Isa
Please login with a confirmed email address before reporting spam
If you're using a physics interface (where the equations are already implemented), no.
Please login with a confirmed email address before reporting spam
you mean that, for example, if I use Magnetic Fields model (mf), I shouldn't compensate the for the missing terms in case using cylindrical coordinates because the model is prepared for it.
Otherwise, if I used a PDE general form interface, divergence and other spacial operators, I would have to introduce some elements such us:
"1/r" or multiply by "r" the first field component before applying "d()/dr". So that I could obtain "1/r*d(rFr)/dr" to obtain the first component of the first gradient, for example.
Thanks!
Best regards,
Isa
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
as a new user I am quite disappointed:
The geometry of the model can be defined as 2D axisymmetric, but when I add the PDE for Poissons equation to it (via PDE (poeq), the equation is not adapted to the geometry?
Which coordinate system is used in the equation? On the drawing/Geometry r and z is used, but it is not clear to me whether the equation is based on a cartesian system x,y,z , or on r,phi,z ?
How is the div (divergence) operator in cartesian and axisymmetric coordinates written in Comsol?
Thanks,
junis
Please login with a confirmed email address before reporting spam
Attachments:
Please login with a confirmed email address before reporting spam
I have 2d-axisymmetric model and I want to define an external force using the divergence of the Maxwell stress tensor. what is the the divergence form in 2d-Axisymmetric ?
I mean where I should put r or divide by (r) in my equation ?
Is d(Tem11,r)+d(Tem12,z) is enough for first element ?
best
Please login with a confirmed email address before reporting spam
where is exactly this (r) and (1/r) should be applied ?
Could u plz help me ?
I have a tensor like this:
T11 T12
T21 T22
I want to apply divergence to this tensor in 2d_ axisymmetric model.
best
Please login with a confirmed email address before reporting spam
what Jean-François tried to explained me, I think so, was that if you use a physics model and you are using 2D axisymmetric geometry, the equations in cilindrical coordinates are already implemented and you don't have to worry about in order to create the correct form in the cilindrical form.
On the other hand, if you are using a mathematical interface where you want to create your own model and using 2D axisymmetric geometry, you will have to take into account that gradient and divergence in cylindrical coordinates are:
grad(f)=df/dr U(r)+1/r (df/dphi) U(phi)+d(f)/dz U(z); where f is a scalar and U(r), U(p)hi and U(z) are unitary vectors.
div F= 1/r d(rFr)/dr+ 1/r d(Fphi)/dphi + d(Fz)/dz; where F is a vector.
I don't know if this explanation has solved your doubt.
Best regards,
Please login with a confirmed email address before reporting spam
Thanks for your response, Actullay I am looking for a divergence of a second order tensor field . you gave me the divergence of a vector.
best
Please login with a confirmed email address before reporting spam
hi,
I have 2d-axisymmetric model and I want to define an external force using the divergence of the Maxwell stress tensor. what is the the divergence form in 2d-Axisymmetric ?
I mean where I should put r or divide by (r) in my equation ?
Is d(Tem11,r)+d(Tem12,z) is enough for first element ?
best
Hi Osameh,
did you get any solution to your Maxwell stress tensor problem?I m having the same issue!
Thanks in advance,
David.
Please login with a confirmed email address before reporting spam
see this:
en.wikipedia.org/wiki/Curvilinear_coordinates#Divergence_of_a_second-order_tensor_field_2
Please login with a confirmed email address before reporting spam
Thanks for your rapid reply Osemeh,
But my other concern is that, for the moment I have just the expression of the Maxwell stress tensor in cartesian coordinates.
How do you transform the Maxwell stress tensor from cartesian coordinates to cylindrical coordinates?
Thanks again for your past answer,
David.
Please login with a confirmed email address before reporting spam
In 2D axisymmetric comsol model, can we say
Txx Txy Trr Trz
Tyy Tyy tensor equivalents to Tzr Tzz tensor?
Then, I can use immediately the wikipedia page that you enclosed to me.
So I think in 2D axisymmetric, we do not use theta from the cylindrical coordinates in 2D axisymmetric, right?
Can you enlighten me on this issue Osameh?
Thanks,
david.
Please login with a confirmed email address before reporting spam
Can we say
Txx Txy
Tyx Tyy
is equivalent to
Trr Trz
Tzr Tzz
?
Thanks
Please login with a confirmed email address before reporting spam
about the Maxwell stress tensor , I think the nature of this tensor is Second Rank Tensor and it is not coordinate dependent.
best
Please login with a confirmed email address before reporting spam
Hi Osameh,
You must be right, the maxwells stress tensor doesn't seem to be coordinate-system dependent for any other orthogonal system.
Thanks again for your rapid responses!
Have a great day and best wishes in your researches!
david
Please login with a confirmed email address before reporting spam
So, the tensor should be different.
I enclose my comsol program if it can be of any help. the equations that I use are in model->definition->variable.
What I did there is basically to say that F=div(T) where T is the maxwell stress tensor
and T=epsilonrEE(transpose)-1/2*EE(transpose)I,
where I is the identity matrix.
Attachments:
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
also as new user, who wasted several weeks now with on false 2D axisymmetric models, I must add that this is far more than dissapointing.
In my opinion it is by far not obvious for the common user that the program uses a different coordinate system internally than defined by the geometry. BTW: at least in the case of the Helmholtz equation the front end does not even show its internal definition of the nabla operator.
I must say, that I thought of comsol multiphysics as a really great piece of software. I mean, the front end, the live links to other programs and its huge spectrum of functionality are really convincing.
Now I must regretfully and painfully learn, that over quite some time all my calculations were complete nonsense.
It is totaly incomprehensible, why the mathematics models are not correctly implemented.
I strongly suggest to correct this flaw in future releases, because it is a completely unnecessary drawback of your otherwise fine software.
cheers,
jan
P.S: It is also not straight forward (at least for me) to manually correct for the missing terms.
Please login with a confirmed email address before reporting spam
I suspect you are running an outdated version of the software. In the current version, the definition of \nabla is displayed when solving the Helmholtz equation using the Mathematics interface; see attached screenshot.
Jeff
Attachments:
Please login with a confirmed email address before reporting spam
thanks. I was running 4.1, which indeed does not come about with this helpful hint.
In the meantime I figured out how to compensate for the missing stuff. Just in case anybody else faces a similar problem...
If your diffusion coefficient c is isotropic, you just muliply *all* coefficients (c,f and a) by r. Thats it.
And voila, it produces the same result as a true 3D calculation.
I don't know what happens if the diffusivity is not isotropic.
greetings,
jan
Please login with a confirmed email address before reporting spam
r or 2*pi*r ? ;)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Maybe you're right with the 2*pi...
But why should there be a factor 2*pi?
I mean, comsol uses nabla =[dr, dz] so the first term operator of the Helmholtz equation looks like
[dr, dz]*(c*[dr,dz])
where c =[c11,0;0,c22] is a diagonal matrix in the isotropic case (dr and dz denote the derivation with respect to r and z).
This is the equal to
dr*(c11*dr) + dz*(c22*dz)
But I really want is
1/r*dr*(r*c11*dr) + dz*(c22*dz)
So in the first step I multiply the whole eqation by r and the above becomes
dr*(r*c11*dr) + dz*(r*c22*dz)
Hence, c has to become r*c.
Did I miss anything?
jan
Please login with a confirmed email address before reporting spam
You have probably not missed anything
,
my 2*pi*r was mainly ment as a reminder, as it's the most common error when integrating in 2D-axi, when one integrate over an edge and desire the area which menas one should not forget hte "2*pi*r*dr" instead of the cartesian "dx*dy"
The same for the development of the 2D-axi variables, to avoid the singularity at r=0, but then it's mostly "r" as the 2*pi* appear twice and simplifies
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
If you're using a Mathematics interface (like coefficient form, general form or weak form), yes.
If you're using a physics interface (where the equations are already implemented), no.
Why is this NOT implemented for general form PDE's, nor explained clearly in the manual?
Are there any models in the model library that give an example how it can be implemented? I just want to see that I have correctly understood what has been said in this thread.
Please login with a confirmed email address before reporting spam
I think in 2D-axisymmetric, we should not have any derivative with respect to Phi in our equations , is it right ?
best
Please login with a confirmed email address before reporting spam
d/dtheta (er) = etheta
so etheta*d/detheta (er) = 1
If \nabla defined as (d/dr ; d/dz ) then we will miss a term in an axisymmetric system when calculating \nabla . ( c \nabla u) = f
for c=1 it should be: d^2/dr^2 (u)+ (1/r)d/dr (u)+ d^2/dz^2 (u)
and not this: d^2/dr^2 (u) + d^2/dz^2 (u)
Can you please clarify on this...
Note: er, etheta and ez are unit vectors in the respective direction.
Please login with a confirmed email address before reporting spam
Maybe this blog post is helpful?
www.comsol.se/blogs/guidelines-for-equation-based-modeling-in-axisymmetric-components/
As a side note, it is possible to use LateX to write easy-to-read equations like
Just precede the LateX code by '[math]'.
At the end of the equation, place '[/m ath]'. (I had to insert a space to convince the system not to believe it was an equation.)
Regards,
Henrik
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.