|
[Sponsors] |
How to use interpolation2DTable feature under codedMixed type of boundary condition |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 20, 2021, 07:03 |
How to use interpolation2DTable feature under codedMixed type of boundary condition
|
#1 |
Member
L S
Join Date: Apr 2016
Posts: 63
Rep Power: 10 |
I came to know that lookup table feature in groovyBC is only applicable for 1D data. e.g. Position of X axis and corresponding Temperate values can be given easily with lookup table.
For, 2D data, we need to user interpolation2DTable feature under codedMixed boundary condition. I need to provide temperature only on certain provided coordinates on heated wall patch. Means I have to provide (X Y T) data on my wall. I have written following boundary condition after reading another post from cfd-online. Code:
bottom { type codedMixed; refValue uniform 373.15; refGradient uniform 0; valueFraction uniform 0; redirectType lookupHeatFluxBC; codeInclude #{ #include "interpolation2DTable.H" #}; code #{ // Construct interpolation2DTable fileName fName = "$FOAM_CASE/temp.dat"; Foam::interpolation2DTable<scalar> lookupTableData(fName); // Example lookup values scalar lookupVal1 = 0.001; scalar lookupVal2 = 374; // Set variable gradient field // Looks up as-> lookupTableData(row,col) in tableData.dat this->refGrad() = lookupTableData(lookupVal1,lookupVal2); #}; } Code:
( (0.0001 ((0.0001 374) (0.0002 375))) (0.0002 ((0.0001 378) (0.0002 376))) ) But, I am getting some erratic results, it is not applying the temperature spatially as I asked for, instead it is applying temperature (that too erratic) with time. What can be the issue? Where am I making mistake? |
|
Tags |
groovybc, interpolation2dtable, openfoam, temperature |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wind turbine simulation | Saturn | CFX | 60 | July 17, 2024 06:45 |
activeBaffleVelocity boundary condition ? | om3ro | OpenFOAM Programming & Development | 10 | November 17, 2020 00:26 |
Compression instead of expansion | EnricoDeFilippi | OpenFOAM Running, Solving & CFD | 1 | October 8, 2018 11:19 |
Pressure instability with rhoSimpleFoam | daniel_mills | OpenFOAM Running, Solving & CFD | 44 | February 17, 2011 18:08 |
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues | michele | OpenFOAM Meshing & Mesh Conversion | 2 | July 15, 2005 05:15 |