CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Usage of flexi's posti_swapmesh tool

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 12, 2022, 02:39
Post Usage of flexi's posti_swapmesh tool
  #1
New Member
 
Vachan Potluri
Join Date: Jul 2017
Posts: 26
Rep Power: 7
vachan is on a distinguished road
Dear all,

I am using flexi (https://www.flexi-project.org/) for a supersonic flow simulation. I have read about the tool posti_swapmesh in flexi userguide. The brief description given there is as follows.

Quote:
Interpolates state file data from one mesh to another.
Uses high-order interpolation and a Newton coordinate
search algorithm. Meshes do not have to be
conforming. A reference state can be given for areas in
the target mesh not covered by the source mesh.
However, the userguide doesn't provide any example for its usage. I tried to come up with a parameter file for this tool based on the help message printed with

Code:
posti_swapmesh --help
My parameter file (parameter_swapmesh.ini) reads as follows.

Code:
meshFileOld = ../grid1/grid1_mesh.h5
meshFileNew = grid2_mesh.h5
NNew = 2
NSuper = 6
NInter = 6
I have executed the tool using

Code:
posti_swapmesh parameter_swapmesh.ini ../grid1/result_State_0000000.008400000.h5
This produces the following error message:

Code:
 | Extract parameter file from "../grid1/result_06Jul2022_State_0000000.008400000.h5" to ".parameter.ini"
 EVALUATING SOLUTION ON NEW MESH ...
 INTERPOLATE STATE TO NEW MESH...DONE  [.037s]
 WRITING NEW SOLUTION ...
 WRITE STATE TO HDF5 FILE...HDF5-DIAG: Error detected in HDF5 (1.12.0) MPI-process 0:
  #000: /home/vachan/Documents/Work/flexi-framework/flexi/share/GNU-MPI/HDF5/build/src/HDF5/src/H5A.c line 312 in H5Acreate2(): unable to create attribute
    major: Attribute
    minor: Unable to initialize object
  #001: /home/vachan/Documents/Work/flexi-framework/flexi/share/GNU-MPI/HDF5/build/src/HDF5/src/H5VLcallback.c line 1023 in H5VL_attr_create(): attribute create failed
    major: Virtual Object Layer
    minor: Unable to create file
  #002: /home/vachan/Documents/Work/flexi-framework/flexi/share/GNU-MPI/HDF5/build/src/HDF5/src/H5VLcallback.c line 989 in H5VL__attr_create(): attribute create failed
    major: Virtual Object Layer
    minor: Unable to create file
  #003: /home/vachan/Documents/Work/flexi-framework/flexi/share/GNU-MPI/HDF5/build/src/HDF5/src/H5VLnative_attr.c line 66 in H5VL__native_attr_create(): not a datatype
    major: Invalid arguments to routine
    minor: Inappropriate type
STOP Could not open or create attribute!
Can anyone help me with overcoming this error?

Thanking in anticipation,
Vachan
vachan is offline   Reply With Quote

Old   July 12, 2022, 04:42
Default
  #2
New Member
 
Join Date: Jul 2022
Posts: 4
Rep Power: 2
mkurz is on a distinguished road
Hi Vachan,

as far as I can tell it seems that the swap operation itself works fine, but writing the newly swapped state to the HDF5 fails for some reason. To narrow down the issue, could you compile FLEXI again using the "CMAKE_BUILD_TYPE=Debug" setting instead of "Release"?. This build configuration performs additional checks and gives more extensive output, which probably helps for debugging. Then, please, run your case again and provide the (hopefully more extensive) error output.
If you have any problems in performing these steps, just let me know, then I can provide further assistance.

Best,
Marius
mkurz is offline   Reply With Quote

Old   July 13, 2022, 00:51
Post
  #3
New Member
 
Vachan Potluri
Join Date: Jul 2017
Posts: 26
Rep Power: 7
vachan is on a distinguished road
Dear Marius,

Thank you very much for responding.

Unfortunately, even the debug build gives the same error log, without any additional information.

Do you suggest HDF5 also be compiled with debug flags for a detailed error log? If yes, then can you please guide me for this process?

Thanks again!
vachan is offline   Reply With Quote

Old   July 13, 2022, 06:02
Default
  #4
New Member
 
Join Date: Jul 2022
Posts: 4
Rep Power: 2
mkurz is on a distinguished road
Hi Vachan,
that's unfortunate.Could you provide me with the "CMakeCache.txt" file in your build folder? Then I can check if there might be a problem with the build configuration or some external dependencies. Could you further provide me your:
  • Compiler type and version
  • MPI type and version
Then I would suggest you try to compile FLEXI with "LIBS_USE_MPI=OFF" (you can create a different build folder for that).
Could you as last resort provide me with the two meshes and the state file? Then I might be able to find the issue, since debugging this remotely seems hard.


Best,
Marius
mkurz is offline   Reply With Quote

Old   July 13, 2022, 06:34
Default
  #5
New Member
 
Vachan Potluri
Join Date: Jul 2017
Posts: 26
Rep Power: 7
vachan is on a distinguished road
Dear Marius,

While following your instructions to setup a new build, I just realised that posti_swapmesh works fine (without any error) if the build uses FLEXI_FV=OFF. I also checked the new State file and it looks correct.

Is this the expected behaviour? If yes then I guess I will have to maintain two separate builds (one for simulations and one for swapmesh).

Anyway, the issue has been sorted.

Thank you very much for the prompt responses!
Vachan
vachan is offline   Reply With Quote

Old   July 13, 2022, 07:42
Default
  #6
New Member
 
Vachan Potluri
Join Date: Jul 2017
Posts: 26
Rep Power: 7
vachan is on a distinguished road
Dear Marius,

Sorry for overloading you with questions. Can you please also look at Wall friction and heat transfer in flexi with FLEXI_FV=ON

Thank you very much,
Vachan
vachan is offline   Reply With Quote

Old   July 13, 2022, 11:19
Default
  #7
New Member
 
Join Date: Jul 2022
Posts: 4
Rep Power: 2
mkurz is on a distinguished road
Quote:
Originally Posted by vachan View Post
While following your instructions to setup a new build, I just realised that posti_swapmesh works fine (without any error) if the build uses FLEXI_FV=OFF. I also checked the new State file and it looks correct.
Is this the expected behaviour? If yes then I guess I will have to maintain two separate builds (one for simulations and one for swapmesh).
Hi Vachan,
this was indeed a bug when using the Swapmesh tool with FV enabled, for which we now have added a fix that should be available by tomorrow on Github, so you can just run a "git pull" by then.
Please be aware that swapping to another mesh is only a provisional way of changing the grid and is only thought of as getting a fast initial guess to initialize the simulation on another grid. The swapping might introduce osciallations and/or artifacts into the solution and is by itself not an optimal solution to run analysis or visualization on, especially with FV subcells enabled.

Best,
Marius
mkurz is offline   Reply With Quote

Old   July 14, 2022, 00:47
Default
  #8
New Member
 
Vachan Potluri
Join Date: Jul 2017
Posts: 26
Rep Power: 7
vachan is on a distinguished road
Dear Marius,

Thank you very much! Indeed I was using this tool to set the initial condition on a finer grid simulation.

However, I am afraid the bug is not fully fixed. It now crashes with the following error, even with FLEXI_FV=OFF.

Code:
INIT OLD MESH ...
 RUNNING A 2D SIMULATION! 
 done in    1.2696579999999999E-003
 INIT NEW MESH ...
 RUNNING A 2D SIMULATION! 
 done in    2.0098820000000002E-003
 EVALUATING PARAMETRIC COORDINATES ...
           0  equal elements,         2000  remaining.
        1000 elements of        2000  processed. Time=   0.79219174000000003     
        2000 elements of        2000  processed. Time=   0.67314885699999993     
 IP with ID:           0           0           0           1 is a troublemaker!
 Coords:  -1.1549063565764680E-002   4.1572813613320832E-002   0.0000000000000000     
 Xi:   375521776384.16803       -259545482419.84808     
 _____________________________________________________________________________
Program abort caused on Proc            0 
  in File : posti/swapmesh/parametriccoords.f90 Line          287 
  This file was compiled at Jul 14 2022  09:28:41
Message: IP not found.
I have also rechecked that the tag v22.03.0 (https://github.com/flexi-framework/f...s/tag/v22.03.0) with FLEXI_FV=OFF works fine for the same set of files.

I can send you the files over mail if you need them. Their size is large to be attached here.

Vachan

Last edited by vachan; July 14, 2022 at 02:26.
vachan is offline   Reply With Quote

Old   July 14, 2022, 09:36
Default
  #9
New Member
 
Join Date: Jul 2022
Posts: 4
Rep Power: 2
mkurz is on a distinguished road
Hi Vachan,
there was a bug for the swapmesh tool in 2D mode. We introduced the 2D-mode for the swapmesh quite recently (for 2D solutions way faster than swapping in 3D). The old POSTI version worked always in 3D and thus works fine for your example.
The bugfix should be available the next days on Github, once it passes our release pipeline.
Best,
Marius
mkurz is offline   Reply With Quote

Old   July 15, 2022, 01:40
Default
  #10
New Member
 
Vachan Potluri
Join Date: Jul 2017
Posts: 26
Rep Power: 7
vachan is on a distinguished road
Dear Marius,

Thanks for the info. I will get back with an update once this fix becomes available on github.

Vachan
vachan is offline   Reply With Quote

Reply

Tags
compressible flow, discontinuous galerkin, flexi

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Literature search tool and database jola Main CFD Forum 0 December 4, 2016 14:56
[ICEM] align vertices tool jumpmonkey ANSYS Meshing & Geometry 2 September 12, 2016 10:37
Tool to download: SU2 post-processing Combas SU2 2 June 5, 2014 15:55
Auto Mesh Tool usage mbilalm STAR-CD 15 August 6, 2010 10:09
Modeling of a Forging Tool. hydro CFX 1 May 19, 2010 19:35


All times are GMT -4. The time now is 21:55.