Hi,
The problem I have is this - My solver assumes that the geometry has been
defined in centimeters. However, I want to allow the user to define the
geometry in some other unit if they want to, and then in some way convert
the units before feeding the file to the solver.
For example, if the user wants to define his geometry in mm, and defines a
line between points (-5, 0, 0) to (5, 0, 0) the coordinates I want to write
to the input file are (-0.5, 0, 0) and (0.5, 0, 0).
Is there a quick way to do this in GiD?
Thanks,
Rama Karve
[GiDlist] Units conversion
Moderator: GiD Team
[GiDlist] Units conversion
Hi Rama:
Just add a field (such as a list of units "m", "cm", "mm", etc.) in the
*.prb file of your problemtype to let the user select the unit associated
with the model. Then, in the *.bas file, use this information to assign a
scaling factor (1, 0.01, 0.001, etc. assuming that the solver will
understand 1 as 1m) for the desired unit conversion. Then, directly
multiply the node coordinates by your scaling factor as you are generating
the *.dat file, or export the scaling factor if your solver can deal with it.
Philippe
The problem I have is this - My solver assumes that the geometry has been
defined in centimeters. However, I want to allow the user to define the
geometry in some other unit if they want to, and then in some way convert
the units before feeding the file to the solver.
Magsoft Corporation
Tel: 518-271-1352
Cell: 518-365-0421 (direct)
www.magsoft-flux.com
Just add a field (such as a list of units "m", "cm", "mm", etc.) in the
*.prb file of your problemtype to let the user select the unit associated
with the model. Then, in the *.bas file, use this information to assign a
scaling factor (1, 0.01, 0.001, etc. assuming that the solver will
understand 1 as 1m) for the desired unit conversion. Then, directly
multiply the node coordinates by your scaling factor as you are generating
the *.dat file, or export the scaling factor if your solver can deal with it.
Philippe
The problem I have is this - My solver assumes that the geometry has been
defined in centimeters. However, I want to allow the user to define the
geometry in some other unit if they want to, and then in some way convert
the units before feeding the file to the solver.
Magsoft Corporation
Tel: 518-271-1352
Cell: 518-365-0421 (direct)
www.magsoft-flux.com
[GiDlist] Units conversion
The "Mark Smith" answer is a mode to solve the problem without use the "GiD
concept of units", the problemtype defines a general data to declare the
current unit, and the bas file check this value and aply the apropiate
factor to the coordinates.
In this case, GiD internally unknown the significate of the general data
unit field.
The "Philippe" approach instead uses the GiD unit concept: Then the user
declare for GiD the model unit from the Data-Unit menu, and GiD write the
coordinates in the bas file in the reference unit.
Not only the model can have unit, also a condition or material field can
have your unit, and GiD automatically translate the input values in the more
user-friendly unit (selected from a listbox) to the reference unit.
See help on Customization-Configuration Files-Unit System file
Enrique Escolano
----- Original Message -----
From: "Rama Karve" rkarve at emagtechnologies.com
To: gidlist at gatxan.cimne.upc.es
Sent: Tuesday, November 04, 2003 11:08 PM
Subject: [GiDlist] Units conversion
Hi,
The problem I have is this - My solver assumes that the geometry has been
defined in centimeters. However, I want to allow the user to define the
geometry in some other unit if they want to, and then in some way convert
the units before feeding the file to the solver.
For example, if the user wants to define his geometry in mm, and defines a
line between points (-5, 0, 0) to (5, 0, 0) the coordinates I want to
write
to the input file are (-0.5, 0, 0) and (0.5, 0, 0).
Is there a quick way to do this in GiD?
Thanks,
Rama Karve
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist
concept of units", the problemtype defines a general data to declare the
current unit, and the bas file check this value and aply the apropiate
factor to the coordinates.
In this case, GiD internally unknown the significate of the general data
unit field.
The "Philippe" approach instead uses the GiD unit concept: Then the user
declare for GiD the model unit from the Data-Unit menu, and GiD write the
coordinates in the bas file in the reference unit.
Not only the model can have unit, also a condition or material field can
have your unit, and GiD automatically translate the input values in the more
user-friendly unit (selected from a listbox) to the reference unit.
See help on Customization-Configuration Files-Unit System file
Enrique Escolano
----- Original Message -----
From: "Rama Karve" rkarve at emagtechnologies.com
To: gidlist at gatxan.cimne.upc.es
Sent: Tuesday, November 04, 2003 11:08 PM
Subject: [GiDlist] Units conversion
Hi,
The problem I have is this - My solver assumes that the geometry has been
defined in centimeters. However, I want to allow the user to define the
geometry in some other unit if they want to, and then in some way convert
the units before feeding the file to the solver.
For example, if the user wants to define his geometry in mm, and defines a
line between points (-5, 0, 0) to (5, 0, 0) the coordinates I want to
write
to the input file are (-0.5, 0, 0) and (0.5, 0, 0).
Is there a quick way to do this in GiD?
Thanks,
Rama Karve
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist