[GiDlist] Problem with units file costumization

Moderator: GiD Team

Post Reply
Andreas Friedberg

[GiDlist] Problem with units file costumization

Post by Andreas Friedberg »

Hi,

1) I've written a template file (tochnog.bas, tochnog.mat, tochnog.prb, tochnog.cnd) in GID 6.1.2 for the Tochnog solver. Now I'm trying to implement a units file (tochnog.uni) as proposed in the reference manual, but it doesn't work. First I tried to write a units file similar to the units.gid file which is inside the scripts directory. GID doesn't write any of the defined units from a units system into the window triggered by the menu data units. I've tried everything to make these units appear. I guess I didn't understand how this units file exactly works.
The new version of GID does recognize these units. I guess a change was made to the units.tcl file, but I couldn't figure out why these units don't appear in the GID version 6.1.2.
I also tried to use the units field in my configuration files to make these defined units appear, for intance in the materials file, but GID 6.1.2 didn't recognize this units field declaration (#UNITS#).
Could anyone help?

regards, Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20020628/6139997c/attachment.htm
Enrique Escolano

[GiDlist] Problem with units file costumization

Post by Enrique Escolano »

1- Update to GiD 7, it contain some corrections about units.

2-If you create a file 'tochnog.uni' (check upper/lowercase on Linux/Unix) inside the problem type
(use to start a copy of 'units.gid' renamed to 'tochnog.uni').
Example of unit file:

USER DEFINED: ENABLED
HIDDEN: temperature, ACELERATION

BEGIN TABLE
ACELERATION : m/s^2, 0.1019716213 Gn, 100cm/s^2, 3.280839895 ft/s^2, 39.37007874 in/s^2, Gal
ANGLE : rad, 57.293489913 deg, 63.661990481 gon, 1018.5916402 mil, 3437.7468732 min, 0.15915495087 r, 0.20626479821 seg
length : m { reference, basic }, 100 cm, 1.0e+3 mm
mass : kg { basic, reference }, 1.0e+3 gr ,1.0e-3 ton
strength : kg*m/s^2 { reference }, N { basic }, 1.0e-1 kp
pressure : N/m^2 { reference }, Pa { Basic }, 1.0e-5 kp/cm^2
temperature : ºC, ºF, ºK
weight : N/m^3 { reference }, 1.0e-4 ton/m^3 , 1.0e-1 kp/m^3 , 1.0e-7 kp/cm^3
END

begin system(international)
aceleration : m/s^2
length : m
mass : kg
strength : N
pressure : N/m^2
temperature : ºC
weight : N/m^3
end

begin system(other)
aceleration : m/s^2
length : m
mass : kg
strength : kp
pressure : kp/cm^2
temperature : ºC
weight : ton/m^3
end


If this file is detected, then a menu 'Data units' is added to the data menu.
Notes:
USER DEFINED: ENABLED
To enable the user to change some output unit of the select basic system.

HIDDEN: temperature, ACELERATION
To hide some unit if the Data Units window.

You can declare a field of a condition, material, etc with units with: #UNITS#, and append the unit to the default value.
See this sample:

NUMBER: 1 CONDITION: Line_Stress
CONDTYPE: over lines
CONDMESHTYPE: over nodes
HELP: A stress applied to the nodes of the selected lines of the model. Units in International System for values are:\n\t (N/m2).
QUESTION: X_Stress#UNITS#
VALUE: 0.0Pa
END CONDITION

If the user change the unit of a field the value es recalculated automatically.

The user must declare (in Data Units) the length units of the model.
The values with unit are written in the output calculation file in the units of the basic system selected by the user

Note:
It exist some new orders of units available from the bas file undocumented now:
*Units('magnitude_name') return the unit name of the current system for a magnitude
BasicUnit('magnitude_name') return the unit name of the basic unit (conversion factor=1 for the basic unit) for a magnitude

example:
*Units(LENGTH)
must returns "cm", "mm", etc
*BasicUnit(LENGTH)
returns allways "m"

Regards
Enrique Escolano
----- Original Message -----
From: Andreas Friedberg
To: gidlist at gatxan.cimne.upc.es
Sent: Thursday, June 28, 2001 8:39 PM
Subject: [GiDlist] Problem with units file costumization


Hi,

1) I've written a template file (tochnog.bas, tochnog.mat, tochnog.prb, tochnog.cnd) in GID 6.1.2 for the Tochnog solver. Now I'm trying to implement a units file (tochnog.uni) as proposed in the reference manual, but it doesn't work. First I tried to write a units file similar to the units.gid file which is inside the scripts directory. GID doesn't write any of the defined units from a units system into the window triggered by the menu data units. I've tried everything to make these units appear. I guess I didn't understand how this units file exactly works.
The new version of GID does recognize these units. I guess a change was made to the units.tcl file, but I couldn't figure out why these units don't appear in the GID version 6.1.2.
I also tried to use the units field in my configuration files to make these defined units appear, for intance in the materials file, but GID 6.1.2 didn't recognize this units field declaration (#UNITS#).
Could anyone help?

regards, Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20020701/7b843eab/attachment.htm
Post Reply