OpenFOAM post-processing cheat sheet (updated from time to time)

Introduction

This article summarizes how to use OpenFOAM's post processing utility postProcess. It is a utility that can output various information about meshes and physical quantities. It can be used both during and after the simulation, but this article summarizes it after the simulation.

Let the working directory of OpenFOAM be caseDir.

How to get the field of physical quantity at each time

Q (second invariant of velocity gradient tensor)

The calculation result of speed is required for execution.

caseDir$ postProcess -func Q

A file named Q is output in the time directory.

y+ Outputs the y + distribution on the wall patch. Execute with the postProcess utility as an option. In the case calculated by pimpleFoam

caseDir$ pimpleFoam -postProcess -func yPlus

A file named yPlus will be output in the time directory.

How to get time series data for a specific point

probe To execute it, you need to prepare the calculation result of the physical quantity you want to acquire and a dictionary file called probes in systems. The contents are

probes


/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  7
     \\/     M anipulation  |
-------------------------------------------------------------------------------
Description
    Writes out values of fields from cells nearest to specified locations.

\*---------------------------------------------------------------------------*/

#includeEtc "caseDicts/postProcessing/probes/probes.cfg"

fields (U);    //Enter the physical quantity you want to acquire in parentheses. In case of multiple, separate with a half-width space(U p ...) 
probeLocations
(
    (0.12 0.01 0.05)    //Coordinates of the point you want to get(x, y, z)
    (0.2 0 -0.5)
);

// ************************************************************************* //

Run

caseDir$ postProcess -func probes

A directory called postProcessing is created in caseDir, and time series data files are output in it.

Recommended Posts

OpenFOAM post-processing cheat sheet (updated from time to time)
vtkXMLUnstructuredGridReader Summary (updated from time to time)
Engineer vocabulary (updated from time to time)
Tensorflow memo [updated from time to time]
Private Python handbook (updated from time to time)
vtkClipPolyData / DataSet Summary (Updated from time to time)
[Updated from time to time] PostmarketOS related notes
Summary of vtkThreshold (updated from time to time)
Summary of gcc options (updated from time to time)
[Updated from time to time] LetCode algorithm and library
Notes on machine learning (updated from time to time)
progate Python learning memo (updated from time to time)
Useful help sites, etc. (updated from time to time)
Apache settings, log confirmation, etc. (* Updated from time to time)
[Updated from time to time] Review of Let Code NumPy
I read the Chainer reference (updated from time to time)
Anaconda updated from 4.2.0 to 4.3.0 (python3.5 updated to python3.6)
[Updated from time to time] Summary of design patterns in Java
Python (from first time to execution)
[Notes / Updated from time to time] This and that of Azure Functions
[Note] AI / machine learning / python related websites [updated from time to time]
Easy conversion from UTC to local time
Updated to Python 2.7.9
[Updated from time to time] Python memos often used for data analysis [N division, etc.]
Sum from 1 to 10
A memorandum of commands, packages, terms, etc. used in linux (updated from time to time)
Curry cheat sheet
SQLite3 cheat sheet
pyenv cheat sheet
(Updated from time to time) Storage location of various VS Code configuration files Memorandum memo
DataNitro, implementation of function to read data from sheet
List of my articles that may be useful in competition pros (updated from time to time)