Input and Output formats of analytics'

Source: Internet
Author: User

 

From http://www.aoxue.org/bbs/read.php? Tid = 118484, ysy11 posts.

 

I. input format requirements

The syntax and other aspects of the ANSYS language are very common with Fortran. For details about the data input and output formats, see FORTRAN. For beginners, inputting data is more likely to lead to errors, so I will discuss some tips in this regard.
Analyticdb uses the * vread command to input data from external files. The input format is generally defined in the next line of the command. For more information about the application of this command, see the help of ANSYS.

 

The input format is different from that in FORTRAN:

(1) There is no INTEGER (I) or G type descriptor in the analyticdb of analyticdb. the type data adopts the type descriptor without the H type descriptor.

(2) In FORTRAN, if the data is an integer but the input format adopts a real number (for example, single-precision floating point F), the system can automatically add a decimal point to the data in the specified format, however, if the input data is an integer, for example, 6, in the format of FW. d In D can only be zero. Otherwise, a read error occurs. then FW. d In D may not be 0.

 

In addition, the following errors may also occur during input:

(1) The length of the input format is greater than the Data Length (refers to the first digit from the beginning of the previous data to the start of the next data, and the decimal point and negative number both occupy one digit), such as 6. _-5.6, the preceding data length should be 6, if the input format is FW. if W> 6 in D, a read error occurs;

(2) The format statement should be placed in the next line of * vread. There can be blank lines between the two lines, but no other statements, or even comments.

Ii. Output Format

The output is basically the same as the input in the format. It is executed using * vwrite, but there are also differences:

You can use % C to control character output, % WI to control integer output, % W. PF, % W. PE, or % W. PG to control real number output;

Brackets are not allowed. For example, the format Statement (f6.0, f5.2, A3) corresponds to: % 6.0f % 5.2f % 3C;

Note that the last format does not contain commas (,), and is not enclosed in parentheses. If there is a comma, the comma will also be output.

An integer number can be output in the format of % (% WI.

% This control statement should also be followed by * vwrite rows, which can be empty rows, but no other statements can be clipped in the middle (not comments ).

It should be noted that % cannot be used in control input.

 

Iii. Example

* Get, Elementnum, element, 0, count

* Get, Nodenum, node, 0, count

* Cfopen, C: \ tecplot, PLT !! Tecplot output file

* Vwrite
('Title = "ANSYS to tecplot for tetrahedron mesh "')

* Vwrite
('Variables = "X", "Y", "Z "')

* Vwrite, Nodenum, elementnum
Zone n = % 5I, E = % 7i, F = fepoint, ET = tetrahedron

* Do, I, 1, nodenum, 1

* Vwrite, Nx (I), NY (I), NZ (I)
(3f12. 6)

* Enddo

* Do, I, 1, elementnum, 1
* Vwrite, Nelem (I, 1), nelem (I, 2), nelem (I, 3), nelem (I, 5)
% 7i % 7i % 7i % 7i

* Enddo
* Cfclos

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.