• No se han encontrado resultados

Material didáctico. Caron, Pablo y Larreteguy, Axel

N/A
N/A
Protected

Academic year: 2021

Share "Material didáctico. Caron, Pablo y Larreteguy, Axel"

Copied!
22
0
0

Texto completo

(1)

Título

Tipo de Producto Autores

Instituto de Tecnología

INTEC

Código del Proyecto y Título del Proyecto

equipos y Procesos Industriales: Separadores de Fases

Responsable del Proyecto

Línea

Área Temática

Fecha

P15T03 - Modelos Multicomponente para el Análisis, Optimización y Diseño de

Larreteguy, Axel

Fluidodinámica Computacional (CFD)

Modelado y Simulación Computacional (MYS) Introducción a Openfoam

Material didáctico Caron, Pablo y Larreteguy, Axel

Octubre 2016

(2)

Introducci´ on a OpenFOAM R

Pablo Caron, Axel Larreteguy

Instituto de Tecnolog´ıa - Universidad Argentina de la Empresa

Caron - Larreteguy (INTEC-UADE) Introducci´on a OpenFOAM R 4 a 6 de nov. CABA 1 / 24

(3)

D´ıa 1: Introducci´ on

¿Qu´ e es OpenFOAM ? R

Es un conjunto de herramientas para la resoluci´ on de problemas planteados en forma de EDP.

¿Qu´ e NO es OpenFOAM ? R

Un programa. No existe un ejecutable, no hay una GUI, no hay botones.

¿Qu´ e es OpenFOAM ? (de nuevo) R

Es un conjunto de herramientas: Solvers para casos particulares

(aprox 80), utilidades para importar/exportar mallas, evaluar su

calidad, operar sobre los datos, etc (aprox 170). Adem´ as de librer´ıas

con modelos de viscosidad, turbuluencia, etc.

(4)

D´ıa 1: Introducci´ on (cont)

¿D´ onde nace OpenFOAM ? R

Originalmente un software cerrado desarrollado por Nabla Ltd y la universidad TFD Chalmers. Al quebrar en el 2004 lo libera con el nombre de OpenFOAM . R

¿Por qu´ e encuentro distintas versiones de OpenFOAM ? R

OpenFOAM descargado de www.openfoam.com

R

Administrado por OpenCFD Ltd, due˜ na de la marca.

Versi´ on m´ as estable.

OpenFOAM descargado de extend-project.de

R

Administrado por Wikki Ltd + comunidad

Muchas funcionalidades aportadas por universidades

¿Existe una versi´ on para Windows?

OpenFOAM est´ R a desarrollado para sistemas Unix-like por lo que no existe una versi´ on oficial.

Est´ a el proyecto openfoam-mswin, pero actualmente est´ a en una fase pre-alpha del desarrollo.

Caron - Larreteguy (INTEC-UADE) Introducci´on a OpenFOAM R 4 a 6 de nov. CABA 3 / 24

(5)

D´ıa 1: Introducci´ on (cont)

¿Por qu´ e utilizar OpenFOAM ? R

Al ser una suite abierta permite saber qu´ e se est´ a resolviendo realmente.

Se pueden desarrollar nuevas funcionalidades a partir de utilidades y/o solvers presentes.

Falla segura, si algo no es adecuado (malla) el solver no puede resolver el problema en cuesti´ on

Si es gratis, ¿D´ onde est´ a la desventaja?

La curva de aprendizaje es muy alta.

Entonces, ¿Por d´ onde se empieza? D´ onde consigo ayuda?

El camino largo: Manuales, tesis de doctorado, foros (la comunidad es muy grande y dispuesta a ayudar)

El camino menos largo: Pagar por capacitaci´ on y/o contacto con

usuarios experimentados

(6)

D´ıa 1: Lid-driven cavity

Ejemplo: cavidad cuadrada con velocidad en su parte superior

Caron - Larreteguy (INTEC-UADE) Introducci´on a OpenFOAM R 4 a 6 de nov. CABA 5 / 24

(7)

D´ıa 1: Lid-driven cavity (cont)

Archivos que componen un caso

Todos los casos tienen la misma estructura

Tiempos

Propiedades, malla, etc invariantes

M´ etodos y procedimentos para

resolver el problema

(8)

D´ıa 1: Lid-driven cavity (cont)

Archivos que componen un caso

Directorio 0

Condiciones iniciales Condiciones de borde

Aparecer´ a un archivo por cada campo que se resuelva

Caron - Larreteguy (INTEC-UADE) Introducci´on a OpenFOAM R 4 a 6 de nov. CABA 6 / 24

(9)

D´ıa 1: Lid-driven cavity (cont)

Archivos que componen un caso

Directorio constant

Propiedades del fluido

Modelo de turbulencia

Malla (inicial)

(10)

D´ıa 1: Lid-driven cavity (cont)

Archivos que componen un caso

Directorio system Control de corrida

Esquemas de interpolaci´ on Solvers lineales

Caron - Larreteguy (INTEC-UADE) Introducci´on a OpenFOAM R 4 a 6 de nov. CABA 6 / 24

(11)

D´ıa 1: Lid-driven cavity (cont)

Discretizaci´ on utilizando blockMesh

(12)

D´ıa 1: Lid-driven cavity (cont)

Discretizaci´ on utilizando blockMesh

convertToMeters 0.1;

vertices (

(0 0 0) (1 0 0) (1 1 0) (0 1 0) (0 0 0.1) (1 0 0.1) (1 1 0.1) (0 1 0.1) );

Caron - Larreteguy (INTEC-UADE) Introducci´on a OpenFOAM R 4 a 6 de nov. CABA 7 / 24

(13)

D´ıa 1: Lid-driven cavity (cont)

Discretizaci´ on utilizando blockMesh

blocks (

hex (0 1 2 3 4 5 6 7) (100 100 1) \ simpleGrading (1 1 1)

);

(14)

D´ıa 1: Lid-driven cavity (cont)

Discretizaci´ on utilizando blockMesh

boundary (

movingWall {

type wall;

faces (

(3 7 6 2) );

} fixedWalls {

type wall;

faces (

(0 4 7 3) (2 6 5 1) (1 5 4 0) );

}

frontAndBack {

type empty;

faces (

(0 3 2 1) (4 5 6 7) );

}

Caron - Larreteguy (INTEC-UADE) Introducci´on a OpenFOAM); R 4 a 6 de nov. CABA 7 / 24

(15)

D´ıa 1: Lid-driven cavity (cont)

Generaci´ on de la malla a partir del archivo blockMeshDict

~> blockMesh

Creating block mesh from

"cavity/constant/polyMesh/blockMeshDict"

Creating curved edges Creating topology blocks Creating topology patches Creating block mesh topology Check topology

Basic statistics

Number of internal faces : 0 Number of boundary faces : 6 Number of defined boundary faces : 6 Number of undefined boundary faces : 0 Checking patch -> block consistency

Creating block offsets Creating merge list .

Writing polyMesh --- Mesh Information ---

boundingBox: (0 0 0) (0.1 0.1 0.01) nPoints: 242

nCells: 100 nFaces: 420 nInternalFaces: 180 --- Patches ---

patch 0 (start: 180 size: 10) name: movingWall patch 1 (start: 190 size: 30) name: fixedWalls patch 2 (start: 220 size: 200) name: frontAndBack

(16)

D´ıa 1: Lid-driven cavity (cont)

Generaci´ on de la malla a partir del archivo blockMeshDict

~> blockMesh

Creating block mesh from

"cavity/constant/polyMesh/blockMeshDict"

Creating curved edges Creating topology blocks Creating topology patches Creating block mesh topology Check topology

Basic statistics

Number of internal faces : 0 Number of boundary faces : 6 Number of defined boundary faces : 6 Number of undefined boundary faces : 0 Checking patch -> block consistency

Creating block offsets Creating merge list .

Creating polyMesh from blockMesh Creating patches

Creating cells

Creating points with scale 0.1

Caron - Larreteguy (INTEC-UADE) Introducci´on a OpenFOAM R 4 a 6 de nov. CABA 8 / 24

(17)

D´ıa 1: Lid-driven cavity (cont)

Generaci´ on de la malla a partir del archivo blockMeshDict

~> blockMesh

Creating block mesh from

"cavity/constant/polyMesh/blockMeshDict"

Creating curved edges Creating topology blocks Creating topology patches Creating block mesh topology Check topology

Basic statistics

Number of internal faces : 0 Number of boundary faces : 6 Number of defined boundary faces : 6 Number of undefined boundary faces : 0 Checking patch -> block consistency

Creating block offsets Creating merge list .

(18)

D´ıa 1: Lid-driven cavity (cont)

Condiciones de borde e iniciales Archivo de velocidad (U)

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField {

movingWall {

type fixedValue;

value uniform (1 0 0);

}

fixedWalls {

type fixedValue;

value uniform (0 0 0);

}

frontAndBack {

type empty;

} }

Archivo de presi´ on (p)

dimensions [0 2 -2 0 0 0 0];

internalField uniform 0;

boundaryField {

movingWall {

type zeroGradient;

}

fixedWalls {

type zeroGradient;

}

frontAndBack {

type empty;

} }

Caron - Larreteguy (INTEC-UADE) Introducci´on a OpenFOAM R 4 a 6 de nov. CABA 9 / 24

(19)

D´ıa 1: Lid-driven cavity (cont)

Propiedades del fluido (transportProperties)

nu nu [ 0 2 -1 0 0 0 0 ] 0.01;

Control de corrida controlDict

application icoFoam;

startFrom startTime;

startTime 0;

stopAt endTime;

endTime 0.5;

deltaT 0.001;

writeControl timeStep;

writeInterval 10;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression off;

timeFormat general;

timePrecision 6;

runTimeModifiable true;

(20)

D´ıa 1: Lid-driven cavity (cont)

Esquemas fvSchemes

ddtSchemes {

default Euler;

} gradSchemes {

default Gauss linear;

grad(p) Gauss linear;

} divSchemes {

default none;

div(phi,U) Gauss linear;

}

laplacianSchemes {

default none;

laplacian(nu,U) Gauss linear orthogonal;

laplacian((1|A(U)),p) Gauss linear orthogonal;

}

interpolationSchemes {

default linear;

interpolate(HbyA) linear;

}

snGradSchemes {

default orthogonal;

}

fluxRequired {

default no;

p ;

}

Solvers lineales fvSolution

solvers {

p {

solver PCG;

preconditioner DIC;

tolerance 1e-06;

relTol 0;

} U {

solver PBiCG;

preconditioner DILU;

tolerance 1e-05;

relTol 0;

} } PISO {

nCorrectors 2;

nNonOrthogonalCorrectors 0;

pRefCell 0;

pRefValue 0;

}

Caron - Larreteguy (INTEC-UADE) Introducci´on a OpenFOAM R 4 a 6 de nov. CABA 11 / 24

(21)

D´ıa 1: Lid-driven cavity (cont)

~> icoFoam Create time

Create mesh for time = 0 Reading transportProperties Reading field p

Reading field U

Reading/calculating face flux field phi

Starting time loop Time = 0.001

Courant Number mean: 0 max: 0

DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 2.74588e-07, No Iterations 3 DILUPBiCG: Solving for Uy, Initial residual = 0, Final residual = 0, No Iterations 0 DICPCG: Solving for p, Initial residual = 1, Final residual = 3.47301e-07, No Iterations 19

time step continuity errors : sum local = 1.18569e-10, global = -1.08526e-20, cumulative = -1.08526e-20 DICPCG: Solving for p, Initial residual = 0.132849, Final residual = 4.73053e-07, No Iterations 17 time step continuity errors : sum local = 3.3567e-10, global = 9.5953e-22, cumulative = -9.89308e-21

(22)

D´ıa 1: Lid-driven cavity (cont)

Caron - Larreteguy (INTEC-UADE) Introducci´on a OpenFOAM R 4 a 6 de nov. CABA 13 / 24

Referencias

Documento similar

The main indicators are: the number of circulating works (number of indexed works), the circulation index (ratio between the number of circulating works and the

The basic geometric assumption, as well as the main theoretical results concerning the estimation of the boundary measure L 0 , are established in Section 3.. To be more specific,

In this Letter we analyze the dilaton production at the (p)reheating stage right after inflation and conclude that no extra relativistic degrees of freedom beyond those already

The results of Experiment 1 showed that repeatedly pairing neutral faces with positive or negative emotional expressions (happy and angry) is effective to change the pattern

Let P n be an n-di- mensional simple convex polytope (an n-dimensional convex polytope is simple if the number of codimension-one faces meeting at each vertex is n; equivalently, P n

In higher dimensions one has four kinds of hypersur- faces with constant normal curvature λ, called λ-hyperplanes: geodesic hyperplanes for λ = 0, metric spheres for λ >

The more general notion of face of a convex set enjoys great presence in the framework of the geometry and structure of Banach spaces, as can be seen in [3].. Mention should also

The following data were considered for platform comparison: number of assigned BW OTUs (Operational Taxonomic Units, genera level), number of BW OTU counts (number of