CN108846059A - OpenFOAM limited bulk analysis result data format and its conversion method towards result post-processing - Google Patents

OpenFOAM limited bulk analysis result data format and its conversion method towards result post-processing Download PDF

Info

Publication number
CN108846059A
CN108846059A CN201810558704.9A CN201810558704A CN108846059A CN 108846059 A CN108846059 A CN 108846059A CN 201810558704 A CN201810558704 A CN 201810558704A CN 108846059 A CN108846059 A CN 108846059A
Authority
CN
China
Prior art keywords
openfoam
file
data
result data
format
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810558704.9A
Other languages
Chinese (zh)
Other versions
CN108846059B (en
Inventor
任羿
夏权
孙博
杨德真
冯强
王自力
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beihang University
Original Assignee
Beihang University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beihang University filed Critical Beihang University
Priority to CN201810558704.9A priority Critical patent/CN108846059B/en
Publication of CN108846059A publication Critical patent/CN108846059A/en
Application granted granted Critical
Publication of CN108846059B publication Critical patent/CN108846059B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/23Design optimisation, verification or simulation using finite element methods [FEM] or finite difference methods [FDM]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2111/00Details relating to CAD techniques
    • G06F2111/10Numerical modelling

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Document Processing Apparatus (AREA)
  • Stored Programmes (AREA)

Abstract

The present invention relates to the OpenFOAM limited bulk analysis result data formats and its conversion method, step that post-process towards result to include:Find OpenFOAM grid file and result data files;By the expression formula in regular expression matching grid file and result data files including data information;It establishes and completes the mapping relations between all data files;Define data storage form, the i.e. grammer, semanteme and format of XML file;It is generated according to XML file format and exports the data file containing mapping relations.The present invention provides a kind of grammers of XML format, realize OpenFOAM result data files to the automatic conversion of XML format, provide a kind of interface document with secondary development to post-process for OpenFOAM simulation result.This document is clear in structure, intuitive, easy to read, the extraction and transmitting of data.

Description

Towards result post-processing OpenFOAM limited bulk analysis result data format and its Conversion method
Technical field
The present invention relates to limited bulk (Finite Volume Method) analysis results to post-process data transfer device, special It is not a kind ofOpenFOAM limited bulk analysis result data format and its conversion method towards result post-processing
Background technique
Fluid Mechanics Computation (CFD) class libraries of OpenFOAM as the object-oriented of open source, with commercial CFD code Fluent, ANSYS CFX are similar.However, due to business software closure cause user can not depth resolving Algorithm and process, and Function is customized according to their own needs.This respect, OpenFOAM not only have the computing capability of business software, but also have very strong Opening and flexibility, code full disclosure, user can be according to demand to grid dividing, computation model, solver, simultaneously The arbitrary parameters such as row calculating are configured, and carry out numerical simulation.In addition, not needed as business software using OpenFOAM Pay the expense of great number.
However, OpenFOAM post-processing section point is relatively weak.If user needs to carry out from the calculated result of OpenFOAM Post-processing is perhaps therefrom extracted required result data for secondary calculating and analysis or needs to be carried out based on OpenFOAM Secondary development, then must also be screened manually to destination file, the result data files quantity generated due to OpenFOAM It is more and have relevance, such as:Grid file needs multiple files are comprehensive to determine, therefore is not easy to that user reads, data mention It takes and transmits, require a great deal of time and energy;Or artificial treatment also is carried out to result by other third party softwares, Software currently used for the post-processing of OpenFOAM numerical result mainly has Paraview, Tecplot etc., but still can not be complete At the customization work of depth, and program staff is needed to complete a large amount of interactive program operation.In consideration of it, it is necessary to provide one kind just It is read in user, data are extracted and the OpenFOAM Simulation result data format and conversion method of transmitting.
Summary of the invention
The purpose of the present invention is a kind of OpenFOAM Simulation result data lattice for reading convenient for user, data extraction and transmitting Formula and conversion method.This method provides a kind of grammers of XML format, realize OpenFOAM result data files to XML The conversion of format, to provide a kind of interface document with secondary development for the post-processing of OpenFOAM simulation result.
To achieve the goals above, the present invention provides a kind of OpenFOAM limited bulk analyses towards result post-processing Result data format and its conversion method, the conversion method can be automatically performed by programming by computer, mainly include following step Suddenly:
The first step:OpenFOAM engineered paths are set, OpenFOAM grid file and result data files are found;
Second step:By regular expression, it is matched in OpenFOAM grid file and result data files comprising data The expression formula of information;
Third step:By the relevance between analysis OpenFOAM grid file, result data files, OpenFOAM is established Mapping relations between grid file, result data files, and complete the foundation of all data mapping relations;
4th step:Grammer, semanteme and the format of definition XML file;
5th step:According to the XML file grammer and format of definition as, XML lattice are write to all data for establishing mapping relations Formula file simultaneously exports.
In the second step, regular expression is also known as regular expression, is often abbreviated as regex, regexp or RE in code, A kind of logical formula operated to character string and spcial character, be exactly with predefined some specific characters and these The combination of specific character forms " regular character string ", for expressing a kind of filter logic to character string.Wherein, canonical table is logical It is often used to retrieve, replaces those texts for meeting some mode or rule.It, be according to the net of OpenFOAM in second step The format of lattice, result data files defines " regular character string ", is matched by canonical, screen and find the use for including in file Data information required for family.
In the third step, OpenFOAM grid file, result data files are usually separately stored in multiple files, are built Vertical mapping relations, which refer to, finds associated data in multiple files, and stores them as set.Such as:Establish grid body Unit-face unit-coordinate-result data mapping relations, the body unit individually stored originally and corresponding face is single Member, point coordinate, result data set.
In 4th step, XML refers to extensible markup language, it can be used to flag data, define data type, permits The original language that family allowable is defined the markup language of oneself.It is stored up by the grammer, semanteme and format of customized XML file Data information of the bag deposit containing mapping relations is extracted and is transmitted convenient for data.
The present invention gives a kind of data format and its conversion for the post-processing of OpenFOAM result by above step Method, while giving interface document and grammer corresponding to OpenFOAM heat analysis result.
Main advantages of the present invention are:For OpenFOAM Numerical Simulation Results data for post-process, secondary calculating with Analysis provides a kind of data storage file of XML format, and this document is clear in structure, intuitive, user can be facilitated to read, and wraps Result data corresponding to gridding information and grid all in model is contained, convenient for the extraction and transmitting of data.User Ke Gen According to the data needed in rapidly extracting file for secondary calculating and analysis.Meanwhile the result data XML format file can be with Interface document as OpenFOAM secondary development.
Detailed description of the invention
The OpenFOAM limited bulk analysis result data format conversion method process that Fig. 1 is post-processed towards result
Fig. 2 grid body-face-point-result data mapping relations
Fig. 3 establishes data mapping relations process
Specific embodiment
To better understand feature and advantage of the invention, below in conjunction with attached drawing, it is described in detail below:Figure 1 describes the process of this method.
User be based on OpenFOAM complete Heat transfer numerical simulation after, need to extract model grid file and corresponding temperature Angle value is post-processed, and perhaps for secondary calculating and analysis or when carrying out secondary development, one kind of the invention is used for The data format and its conversion method of OpenFOAM result post-processing, specific implementation step are:
The first step:According to the installation path of OpenFOAM and Heat transfer numerical simulation engineered paths, Heat transfer numerical simulation is found The grid file and result data files of model after the completion.
Second step:The grid file and end document format data after the completion of OpenFOAM Heat transfer numerical simulation are concluded, is led to It is as follows with format:
Grid file and Heat transfer numerical simulation destination file are only had any different in character string, and corresponding regular expressions are passed through Formula, matching are found and are extracted in OpenFOAM grid file and result data files comprising data information.
Third step:Establish grid body unit-face unit-coordinate-temperature value of model in Heat transfer numerical simulation Mapping relations need to extract cellZones, owner, neighbour, faces, points, T text in OpenFOAM calculated result Data in part, the mapping relations between these files are as shown in Fig. 2, wherein the meaning of solid line is the source of data information, band The realization of double-head arrow then indicates body unit, and face unit, point number, the mapping between point coordinate and result data (temperature value) are closed System.
The data information extracted will be matched in second step and carries out classification set according to the mapping relations of foundation, and completes institute There is the foundation of data mapping relations, process is as shown in Figure 3, wherein i is number, and coding rule successively establishes grid since 0 Body unit-face unit-coordinate-result data (temperature value) mapping relations, maximum number is that element number sum subtracts One.
4th step:According to the obtained grid of Heat transfer numerical simulation, calculation result data and type, definition XML file Grammer, semanteme and format, as follows:
5th step:Program in machine code is write according to above-mentioned flow and method, according to XML file grammer and lattice defined in the 4th step Formula is write as XML format file to all data acquisition systems for establishing mapping relations and is exported.
It is numerical simulation knot provided by the present invention for the data format and its conversion method of the post-processing of OpenFOAM result Fruit data are for post-processing, secondary calculating and analysis and secondary development provide a kind of data-interface file of XML format, should File structure is clear, intuitive, easy-to-read, convenient for the extraction and transmitting of data.

Claims (4)

1. OpenFOAM limited bulk analysis result data format and its conversion method, feature towards result post-processing exist In:It is comprised the steps of:
The first step:OpenFOAM engineered paths are set, OpenFOAM grid file and result data files are found;
Second step:By regular expression, it is matched in OpenFOAM grid file and result data files comprising data information Expression formula;
Third step:By the relevance between analysis OpenFOAM grid file, result data files, OpenFOAM grid is established Mapping relations between file, result data files, and complete the foundation of all data mapping relations;
4th step:Grammer, semanteme and the format of definition XML file;
5th step:According to the XML file grammer and format of definition as, XML format text is write to all data for establishing mapping relations Part simultaneously exports.
By above step, a kind of data format and its conversion method for the post-processing of OpenFOAM result is given.
2. it is according to claim 1 towards result post-processing OpenFOAM limited bulk analysis result data format and its Conversion method, it is characterised in that:
In the second step, the grid file and end data file lattice after the completion of OpenFOAM Heat transfer numerical simulation are concluded Formula, by corresponding regular expression, matching is found and extracted wraps in OpenFOAM grid file and result data files Containing data information, general format is as follows:
Grid file and Heat transfer numerical simulation destination file are only had any different in character string.
3. it is according to claim 1 towards result post-processing OpenFOAM limited bulk analysis result data format and its Conversion method, it is characterised in that:
In the third step, by the relevance between analysis OpenFOAM grid file, result data files, establish Mapping relations between OpenFOAM grid file, result data files, and complete the foundation of all data mapping relations.Its In, cellZones, owner, neighbour, faces, points, T text in OpenFOAM calculated result are extracted by second step Data in part establish grid body unit in Heat transfer numerical simulation-face unit-coordinate-number of results according to the process of Fig. 3 According to mapping relations, the body unit that all scripts are individually stored and corresponding face unit, point coordinate, result data set. Wherein, i is number, and coding rule successively establishes grid body unit-face unit-coordinate-result data (temperature since 0 Angle value) mapping relations, maximum number be that element number sum subtracts one.
4. it is according to claim 1 towards result post-processing OpenFOAM limited bulk analysis result data format and its Conversion method, it is characterised in that:
In 4th step, the data letter comprising mapping relations is stored by the grammer, semanteme and format of customized XML file Breath is extracted and is transmitted convenient for data.According to the obtained grid of Heat transfer numerical simulation, calculation result data and type, XML is defined Grammer, semanteme and the format of file, as follows:
CN201810558704.9A 2018-06-01 2018-06-01 OpenFOAM finite volume analysis result data format for result post-processing and conversion method thereof Active CN108846059B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810558704.9A CN108846059B (en) 2018-06-01 2018-06-01 OpenFOAM finite volume analysis result data format for result post-processing and conversion method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810558704.9A CN108846059B (en) 2018-06-01 2018-06-01 OpenFOAM finite volume analysis result data format for result post-processing and conversion method thereof

Publications (2)

Publication Number Publication Date
CN108846059A true CN108846059A (en) 2018-11-20
CN108846059B CN108846059B (en) 2022-04-05

Family

ID=64210199

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810558704.9A Active CN108846059B (en) 2018-06-01 2018-06-01 OpenFOAM finite volume analysis result data format for result post-processing and conversion method thereof

Country Status (1)

Country Link
CN (1) CN108846059B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113609556A (en) * 2021-07-20 2021-11-05 国网河北省电力有限公司雄安新区供电公司 GIM format and XDB format lossless conversion method of basic C #, and base XDB format lossless conversion method
CN115618653A (en) * 2022-11-30 2023-01-17 北京云庐科技有限公司 Method, server and program product for post-processing of simulation calculation results of CAE software

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0890154A1 (en) * 1996-03-25 1999-01-13 Rolf Wadewitz Data-conversion method
CN101055578A (en) * 2006-04-12 2007-10-17 龙搜(北京)科技有限公司 File content dredger based on rule
CN104636566A (en) * 2015-03-13 2015-05-20 中国矿业大学 Dynamic mesh numerical solution method based on modified fluid motion equation
CN106294606A (en) * 2016-07-29 2017-01-04 北京蓝威技术有限公司 A kind of CAE document conversion method based on general read-write framework and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0890154A1 (en) * 1996-03-25 1999-01-13 Rolf Wadewitz Data-conversion method
CN101055578A (en) * 2006-04-12 2007-10-17 龙搜(北京)科技有限公司 File content dredger based on rule
CN101361063A (en) * 2006-04-12 2009-02-04 龙搜(北京)科技有限公司 System and method supporting document content mining based on rules
CN104636566A (en) * 2015-03-13 2015-05-20 中国矿业大学 Dynamic mesh numerical solution method based on modified fluid motion equation
CN106294606A (en) * 2016-07-29 2017-01-04 北京蓝威技术有限公司 A kind of CAE document conversion method based on general read-write framework and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113609556A (en) * 2021-07-20 2021-11-05 国网河北省电力有限公司雄安新区供电公司 GIM format and XDB format lossless conversion method of basic C #, and base XDB format lossless conversion method
CN113609556B (en) * 2021-07-20 2023-09-08 国网河北省电力有限公司雄安新区供电公司 GIM format and XDB format lossless conversion method based on C#
CN115618653A (en) * 2022-11-30 2023-01-17 北京云庐科技有限公司 Method, server and program product for post-processing of simulation calculation results of CAE software

Also Published As

Publication number Publication date
CN108846059B (en) 2022-04-05

Similar Documents

Publication Publication Date Title
CN104268428B (en) A kind of visual configuration method calculated for index
Butts network: a Package for Managing Relational Data in R
CN110277165A (en) Aided diagnosis method, device, equipment and storage medium based on figure neural network
CN107885499A (en) A kind of interface document generation method and terminal device
CN104899016B (en) Allocating stack Relation acquisition method and device
CN104020994B (en) Stream process definition device and stream process based on streaming system define method
CN104267966B (en) The generation method and device of the program code of software
CN102741875A (en) Content management device, content management method, content management program, and integrated circuit
US11158118B2 (en) Language model, method and apparatus for interpreting zoning legal text
CN103279478A (en) Method for extracting features based on distributed mutual information documents
CN107533633A (en) It is used for data manipulation using learning program
CN108846059A (en) OpenFOAM limited bulk analysis result data format and its conversion method towards result post-processing
CN104360837B (en) The method for realizing electronic data evidence obtaining analysis in evidence obtaining software based on custom script
CN106796618A (en) Time series forecasting device and time sequence forecasting method
JP2012137840A (en) Electronic book trial reading data creation device and creation method
CN110705244B (en) Method and device for automatically generating article based on template
Ghosh et al. Modeling and asynchronous distributed simulation analyzing complex systems
CN107273109A (en) The method and system modeled to source code and the method using data model
CN109298882A (en) Management method, computer readable storage medium and the terminal device of interface
WO2022262487A1 (en) Form generation method, apparatus and device, and medium
US20170192407A1 (en) Method and apparatus for enabling model driven navigation
CN108614814A (en) A kind of abstracting method of evaluation information, device and equipment
CN107145476A (en) One kind is based on improvement TF IDF keyword extraction algorithms
CN110188337A (en) Revise mask method, device, equipment and computer readable storage medium
CN109255480A (en) Between servant lead prediction technique, device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant