CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

How to use interpolation2DTable feature under codedMixed type of boundary condition

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

LinkBack Thread Tools Search this Thread Display Modes
Old   July 20, 2021, 06:03
Default How to use interpolation2DTable feature under codedMixed type of boundary condition
Join Date: Apr 2016
Posts: 63
Rep Power: 10
silviliril is on a distinguished road
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.

	type codedMixed;
	refValue uniform 373.15;
	refGradient uniform 0;
	valueFraction uniform 0;
	redirectType lookupHeatFluxBC;

	#include "interpolation2DTable.H"


	// 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);


and lookup table is something like this:
(0.0001	((0.0001 374) (0.0002 375)))
(0.0002	((0.0001 378) (0.0002 376)))
where decimal values represents the X and Y coordinates in meters and 374 represents temperature value in Kelvin.

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?
silviliril is offline   Reply With Quote


groovybc, interpolation2dtable, openfoam, temperature

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
activeBaffleVelocity boundary condition ? om3ro OpenFOAM Programming & Development 10 November 16, 2020 23:26
Wind turbine simulation Saturn CFX 58 July 3, 2020 01:13
Compression instead of expansion EnricoDeFilippi OpenFOAM Running, Solving & CFD 1 October 8, 2018 10:19
Pressure instability with rhoSimpleFoam daniel_mills OpenFOAM Running, Solving & CFD 44 February 17, 2011 17:08
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 04:15

All times are GMT -4. The time now is 23:49.