[GiDlist] Cartesian components of a normal pressure

Moderator: GiD Team

Alejandro A. Ortiz Bernardin, Ph.D.

[GiDlist] Cartesian components of a normal pressure

Postby Alejandro A. Ortiz Bernardin, Ph.D. » Tue Oct 07, 2014 4:38 pm

Dear friends,



Is there any way to make the following operation in GiD? I defined a 2D
pressure that is normal to an element edge. The edge is not aligned with the
Cartesian axis. Therefore, I would like to decompose the normal pressure
into its X and Y component and then write these X and Y components in the
*.bas file. Is this possible in GiD? Thanks.



Best regards,

Alejandro.





---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/6b4997a3/attachment.htm
User avatar
escolano
Posts: 1568
Joined: Thu Sep 18, 2014 3:31 pm

[GiDlist] Cartesian components of a normal pressure

Postby escolano » Tue Oct 07, 2014 5:40 pm

In the .bas file you can do small operations with the *Operation command

and then it is possible to can calculate what you want based on

- the value of the condition (declared over lines- over face elements) and
on the edge (the i-face of the surfacic element) where is applied.

-the coordinates of the two nodes of the edges.



The .bas file language is very limited, for complex thinks you can invoke a
Tcl procedure with *Tcl and inside this procedure you can ask GiD
information , calculate what you want and return the string to be printed in
the calculation file. Tcl is a powerful scripting language.



In any case I recommend you to avoid this x y decomposition in the
calculation file, I recommend you to directly write the normal pressure with
sign (e.g. positive pointing inwards) and then calculate the x,y components
if required inside the solver.



Note: In the problemtype it is possible to declare also a symbol to be drawn
in the model (e.g. some arrows to represent the pressure) and this symbol
could be defined to be oriented locally (in the local axes of curve where it
is applied, x-local= curve tangent), this is an example:





De: gidlist-bounces at listas.cimne.upc.edu
[mailto:gidlist-bounces at listas.cimne.upc.edu] En nombre de Alejandro A.
Ortiz Bernardin, Ph.D.
Enviado el: martes, 7 de octubre de 2014 17:38
Para: gidlist at listas.cimne.upc.edu
Asunto: [GiDlist] Cartesian components of a normal pressure



Dear friends,



Is there any way to make the following operation in GiD? I defined a 2D
pressure that is normal to an element edge. The edge is not aligned with the
Cartesian axis. Therefore, I would like to decompose the normal pressure
into its X and Y component and then write these X and Y components in the
*.bas file. Is this possible in GiD? Thanks.



Best regards,

Alejandro.





_____


http://www.avast.com/ Imagen quitada por el remitente.

This email is free from viruses and malware because avast! Antivirus
http://www.avast.com/ protection is active.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/7c643f89/attachment-0001.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 823 bytes
Desc: not available
Url : http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/7c643f89/attachment-0001.jpeg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 11635 bytes
Desc: not available
Url : http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/7c643f89/attachment-0002.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 9015 bytes
Desc: not available
Url : http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/7c643f89/attachment-0003.png
Alejandro A. Ortiz Bernardin, Ph.D.

[GiDlist] Cartesian components of a normal pressure

Postby Alejandro A. Ortiz Bernardin, Ph.D. » Tue Oct 07, 2014 5:48 pm

thanks! the sign trick is fine to me.



De: gidlist-bounces at listas.cimne.upc.edu
[mailto:gidlist-bounces at listas.cimne.upc.edu] En nombre de Enrique Escolano
Enviado el: Tuesday, October 07, 2014 1:41 PM
Para: gidlist at listas.cimne.upc.edu
Asunto: Re: [GiDlist] Cartesian components of a normal pressure



In the .bas file you can do small operations with the *Operation command

and then it is possible to can calculate what you want based on

- the value of the condition (declared over lines- over face elements) and
on the edge (the i-face of the surfacic element) where is applied.

-the coordinates of the two nodes of the edges.



The .bas file language is very limited, for complex thinks you can invoke a
Tcl procedure with *Tcl and inside this procedure you can ask GiD
information , calculate what you want and return the string to be printed in
the calculation file. Tcl is a powerful scripting language.



In any case I recommend you to avoid this x y decomposition in the
calculation file, I recommend you to directly write the normal pressure with
sign (e.g. positive pointing inwards) and then calculate the x,y components
if required inside the solver.



Note: In the problemtype it is possible to declare also a symbol to be drawn
in the model (e.g. some arrows to represent the pressure) and this symbol
could be defined to be oriented locally (in the local axes of curve where it
is applied, x-local= curve tangent), this is an example:





De: gidlist-bounces at listas.cimne.upc.edu
[mailto:gidlist-bounces at listas.cimne.upc.edu] En nombre de Alejandro A.
Ortiz Bernardin, Ph.D.
Enviado el: martes, 7 de octubre de 2014 17:38
Para: gidlist at listas.cimne.upc.edu
Asunto: [GiDlist] Cartesian components of a normal pressure



Dear friends,



Is there any way to make the following operation in GiD? I defined a 2D
pressure that is normal to an element edge. The edge is not aligned with the
Cartesian axis. Therefore, I would like to decompose the normal pressure
into its X and Y component and then write these X and Y components in the
*.bas file. Is this possible in GiD? Thanks.



Best regards,

Alejandro.





_____


http://www.avast.com/ Imagen quitada por el remitente.

This email is free from viruses and malware because avast! Antivirus
http://www.avast.com/ protection is active.





---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/c823a878/attachment-0001.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 9015 bytes
Desc: not available
Url : http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/c823a878/attachment-0002.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 11635 bytes
Desc: not available
Url : http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/c823a878/attachment-0003.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 823 bytes
Desc: not available
Url : http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/c823a878/attachment-0001.jpeg
Alejandro A. Ortiz Bernardin, Ph.D.

[GiDlist] Cartesian components of a normal pressure

Postby Alejandro A. Ortiz Bernardin, Ph.D. » Tue Oct 07, 2014 10:44 pm

Dear Enrique,



Could you please tell me how to use ElemsNormal to obtain only the normal
vector to an specific element's edge?



Thank you!



De: gidlist-bounces at listas.cimne.upc.edu
[mailto:gidlist-bounces at listas.cimne.upc.edu] En nombre de Enrique Escolano
Enviado el: Tuesday, October 07, 2014 1:41 PM
Para: gidlist at listas.cimne.upc.edu
Asunto: Re: [GiDlist] Cartesian components of a normal pressure



In the .bas file you can do small operations with the *Operation command

and then it is possible to can calculate what you want based on

- the value of the condition (declared over lines- over face elements) and
on the edge (the i-face of the surfacic element) where is applied.

-the coordinates of the two nodes of the edges.



The .bas file language is very limited, for complex thinks you can invoke a
Tcl procedure with *Tcl and inside this procedure you can ask GiD
information , calculate what you want and return the string to be printed in
the calculation file. Tcl is a powerful scripting language.



In any case I recommend you to avoid this x y decomposition in the
calculation file, I recommend you to directly write the normal pressure with
sign (e.g. positive pointing inwards) and then calculate the x,y components
if required inside the solver.



Note: In the problemtype it is possible to declare also a symbol to be drawn
in the model (e.g. some arrows to represent the pressure) and this symbol
could be defined to be oriented locally (in the local axes of curve where it
is applied, x-local= curve tangent), this is an example:





De: gidlist-bounces at listas.cimne.upc.edu
[mailto:gidlist-bounces at listas.cimne.upc.edu] En nombre de Alejandro A.
Ortiz Bernardin, Ph.D.
Enviado el: martes, 7 de octubre de 2014 17:38
Para: gidlist at listas.cimne.upc.edu
Asunto: [GiDlist] Cartesian components of a normal pressure



Dear friends,



Is there any way to make the following operation in GiD? I defined a 2D
pressure that is normal to an element edge. The edge is not aligned with the
Cartesian axis. Therefore, I would like to decompose the normal pressure
into its X and Y component and then write these X and Y components in the
*.bas file. Is this possible in GiD? Thanks.



Best regards,

Alejandro.





_____


http://www.avast.com/ Imagen quitada por el remitente.

This email is free from viruses and malware because avast! Antivirus
http://www.avast.com/ protection is active.





---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/35fe0e62/attachment-0001.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 9015 bytes
Desc: not available
Url : http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/35fe0e62/attachment-0002.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 11635 bytes
Desc: not available
Url : http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/35fe0e62/attachment-0003.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 823 bytes
Desc: not available
Url : http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/35fe0e62/attachment-0001.jpeg
User avatar
escolano
Posts: 1568
Joined: Thu Sep 18, 2014 3:31 pm

[GiDlist] Cartesian components of a normal pressure

Postby escolano » Wed Oct 08, 2014 9:19 am

ElemsNormal only provide the normal of the element

For surface elements the normal is the surface normal

For 2D line elements the normal is defined rotating the tangent vector 90
degrees counter-clockwise (in 3D this normal is now well defined)



No exists any commando to ask for an element's edge normal. If your model is
2D and your element is surfacic you could calculate this normal from the
edge node's coordinates:

Calculate the unitary tangent vector from n1 to n2 and then rotate it 90
degrees

Tangent=tx,ty - Normal=-ty,tx





De: gidlist-bounces at listas.cimne.upc.edu
[mailto:gidlist-bounces at listas.cimne.upc.edu] En nombre de Alejandro A.
Ortiz Bernardin, Ph.D.
Enviado el: martes, 7 de octubre de 2014 23:45
Para: gidlist at listas.cimne.upc.edu
Asunto: Re: [GiDlist] Cartesian components of a normal pressure



Dear Enrique,



Could you please tell me how to use ElemsNormal to obtain only the normal
vector to an specific element's edge?



Thank you!



De: gidlist-bounces at listas.cimne.upc.edu
[mailto:gidlist-bounces at listas.cimne.upc.edu] En nombre de Enrique Escolano
Enviado el: Tuesday, October 07, 2014 1:41 PM
Para: gidlist at listas.cimne.upc.edu
Asunto: Re: [GiDlist] Cartesian components of a normal pressure



In the .bas file you can do small operations with the *Operation command

and then it is possible to can calculate what you want based on

- the value of the condition (declared over lines- over face elements) and
on the edge (the i-face of the surfacic element) where is applied.

-the coordinates of the two nodes of the edges.



The .bas file language is very limited, for complex thinks you can invoke a
Tcl procedure with *Tcl and inside this procedure you can ask GiD
information , calculate what you want and return the string to be printed in
the calculation file. Tcl is a powerful scripting language.



In any case I recommend you to avoid this x y decomposition in the
calculation file, I recommend you to directly write the normal pressure with
sign (e.g. positive pointing inwards) and then calculate the x,y components
if required inside the solver.



Note: In the problemtype it is possible to declare also a symbol to be drawn
in the model (e.g. some arrows to represent the pressure) and this symbol
could be defined to be oriented locally (in the local axes of curve where it
is applied, x-local= curve tangent), this is an example:





De: gidlist-bounces at listas.cimne.upc.edu
[mailto:gidlist-bounces at listas.cimne.upc.edu] En nombre de Alejandro A.
Ortiz Bernardin, Ph.D.
Enviado el: martes, 7 de octubre de 2014 17:38
Para: gidlist at listas.cimne.upc.edu
Asunto: [GiDlist] Cartesian components of a normal pressure



Dear friends,



Is there any way to make the following operation in GiD? I defined a 2D
pressure that is normal to an element edge. The edge is not aligned with the
Cartesian axis. Therefore, I would like to decompose the normal pressure
into its X and Y component and then write these X and Y components in the
*.bas file. Is this possible in GiD? Thanks.



Best regards,

Alejandro.





_____


http://www.avast.com/ Imagen quitada por el remitente.

This email is free from viruses and malware because avast! Antivirus
http://www.avast.com/ protection is active.





_____


http://www.avast.com/ Imagen quitada por el remitente.

This email is free from viruses and malware because avast! Antivirus
http://www.avast.com/ protection is active.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141008/e23e9a1d/attachment-0001.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 823 bytes
Desc: not available
Url : http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141008/e23e9a1d/attachment-0001.jpeg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 9015 bytes
Desc: not available
Url : http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141008/e23e9a1d/attachment-0002.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 11635 bytes
Desc: not available
Url : http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141008/e23e9a1d/attachment-0003.png
Alejandro A. Ortiz Bernardin

[GiDlist] Cartesian components of a normal pressure

Postby Alejandro A. Ortiz Bernardin » Wed Oct 08, 2014 11:31 am

Ok. Thanks. I have functions to compute the normals to the edges inside my code. So, no problem. It is just I thought it would be better for my code to obtain them from GiD if they would be already available in there.

Sent from my iPhone

On Oct 8, 2014, at 5:19 AM, "Enrique Escolano" escolano at cimne.upc.edu wrote:

ElemsNormal only provide the normal of the element
For surface elements the normal is the surface normal
For 2D line elements the normal is defined rotating the tangent vector 90 degrees counter-clockwise (in 3D this normal is now well defined)

No exists any commando to ask for an element’s edge normal. If your model is 2D and your element is surfacic you could calculate this normal from the edge node’s coordinates:
Calculate the unitary tangent vector from n1 to n2 and then rotate it 90 degrees
Tangent=tx,ty - Normal=-ty,tx


De: gidlist-bounces at listas.cimne.upc.edu [mailto:gidlist-bounces at listas.cimne.upc.edu] En nombre de Alejandro A. Ortiz Bernardin, Ph.D.
Enviado el: martes, 7 de octubre de 2014 23:45
Para: gidlist at listas.cimne.upc.edu
Asunto: Re: [GiDlist] Cartesian components of a normal pressure

Dear Enrique,

Could you please tell me how to use ElemsNormal to obtain only the normal vector to an specific element's edge?

Thank you!

De: gidlist-bounces at listas.cimne.upc.edu [mailto:gidlist-bounces at listas.cimne.upc.edu] En nombre de Enrique Escolano
Enviado el: Tuesday, October 07, 2014 1:41 PM
Para: gidlist at listas.cimne.upc.edu
Asunto: Re: [GiDlist] Cartesian components of a normal pressure

In the .bas file you can do small operations with the *Operation command
and then it is possible to can calculate what you want based on
- the value of the condition (declared over lines- over face elements) and on the edge (the i-face of the surfacic element) where is applied.
-the coordinates of the two nodes of the edges.

The .bas file language is very limited, for complex thinks you can invoke a Tcl procedure with *Tcl and inside this procedure you can ask GiD information , calculate what you want and return the string to be printed in the calculation file. Tcl is a powerful scripting language.

In any case I recommend you to avoid this x y decomposition in the calculation file, I recommend you to directly write the normal pressure with sign (e.g. positive pointing inwards) and then calculate the x,y components if required inside the solver.

Note: In the problemtype it is possible to declare also a symbol to be drawn in the model (e.g. some arrows to represent the pressure) and this symbol could be defined to be oriented locally (in the local axes of curve where it is applied, x-local= curve tangent), this is an example:
image001.png image002.png

De: gidlist-bounces at listas.cimne.upc.edu [mailto:gidlist-bounces at listas.cimne.upc.edu] En nombre de Alejandro A. Ortiz Bernardin, Ph.D.
Enviado el: martes, 7 de octubre de 2014 17:38
Para: gidlist at listas.cimne.upc.edu
Asunto: [GiDlist] Cartesian components of a normal pressure

Dear friends,

Is there any way to make the following operation in GiD? I defined a 2D pressure that is normal to an element edge. The edge is not aligned with the Cartesian axis. Therefore, I would like to decompose the normal pressure into its X and Y component and then write these X and Y components in the *.bas file. Is this possible in GiD? Thanks.

Best regards,
Alejandro.



~WRD242.jpg
This email is free from viruses and malware because avast! Antivirus protection is active.




~WRD242.jpg
This email is free from viruses and malware because avast! Antivirus protection is active.


_______________________________________________
GiDlist mailing list
GiDlist at listas.cimne.upc.edu
http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141008/cdf0bad0/attachment.htm

Return to “2014”

Who is online

Users browsing this forum: No registered users and 1 guest