Commit 34b47709 authored by Andrew Heather's avatar Andrew Heather Committed by Mark OLESEN
Browse files

TUT: Added glTF export example for field and track data

parent 85b40520
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2106 |
| \\ / O peration | Version: v2112 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
......@@ -20,5 +20,32 @@ sampleFrequency 1;
maxPositions 1000000;
//maxTracks 5;
setFormat gltf;
formatOptions
{
animate yes;
colour yes;
animationInfo
{
colour field;
colourField d;
//min 0;
//max 0.002;
//alpha uniform;
//alphaValue 1;
alpha field;
alphaField d;
normalise yes;
}
}
fields (d);
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2112 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object particleTrackProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
cloud reactingCloud1;
sampleFrequency 1;
maxPositions 1000000;
//maxTracks 5;
setFormat gltf;
formatOptions
{
animate yes;
colour yes;
animationInfo
{
colour field;
colourField d;
//min 0;
//max 0.002;
//alpha uniform;
//alphaValue 1;
alpha field;
alphaField d;
normalise yes;
}
}
fields (d);
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2112 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object particleTrackProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
cloud reactingCloud1;
sampleFrequency 1;
maxPositions 1000000;
//maxTracks 5;
setFormat gltf;
formatOptions
{
animate no;
colour yes;
fieldInfo
{
d
{
colourMap rainbow;
min 0;
max 0.001;
alpha field; // uniform | field;
//alphaValue 0.1; // uniform alpha value
alphaField d;
normalise yes;
}
}
}
fields (d);
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2106 |
| \\ / O peration | Version: v2112 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
......@@ -52,6 +52,7 @@ maxDeltaT 1;
functions
{
#include "sample"
#include "dataCloud"
#include "vtkCloud"
#include "vtkWrite"
......
// -*- C++ -*-
sample1
{
type sets;
libs (sampling);
setFormat gltf;
interpolationScheme cellPointFace;
formatOptions
{
// Optionally add colours to fields
// - default: colour map limits set to field limits
colour yes;
fieldInfo
{
T
{
colourMap fire;
alpha field; // uniform | field;
//alphaValue 0.1; // uniform alpha value
alphaField T;
normalise yes;
}
}
}
fields ( p T k epsilon U );
writeControl writeTime;
sets
(
line
{
type face;
axis xyz;
start (0 0.5 0);
end (4 0.5 0.05);
nPoints 10;
}
cells
{
type cellCentre;
}
);
}
// ************************************************************************* //
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment