|
[Sponsors] |
April 29, 2019, 11:17 |
Lookup tables without timesteps
|
#1 |
New Member
Mohamad
Join Date: Apr 2017
Location: Oxford, UK
Posts: 10
Rep Power: 9 |
Hi all,
I need to find Ct value based on a table (example below): tableA.dat surgeAmplitude(m) Ct 0.10 0.58 0.35 0.35 0.52 0.79 0.79 0.91 I'm using OF 4.1 and I want to code something like: newTurbineForce.C // * * * * * * * Member Functions * * * * * * * // ... { // position of the turbine hub (vector (x,y,z)) at every timestep turbinePosition = motion.transform(hubPosition_); // calculate surgeAmplitude (m) scalar surgeAmp = turbinePosition.x() - hubPosition_.x(); // if surgeAmp = 0.1 { // lookup tableA.dat // Ct = 0.58} // elseif surgeAmp = 0.35 { // lookup tableA.dat // Ct = 0.35} // elseif surgeAmp = 0.2 { // lookup tableA.dat // need to do some interpolation // Ct = interpolated value} } I am quite new in coding using OF. I searched the forum and found some thread on lookup tables based on timestep. However, in my case, I only want to lookup the tableA.dat based on the surgeAmp value, not timestep. Can someone help/guide me with this? Or have anyone done something similar? Regards, Mohamad |
|
Tags |
lookup table |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] groovyBC lookup tables for Reynolds stress R tensor field | rdbisme | OpenFOAM Community Contributions | 3 | July 19, 2021 03:37 |
Long output in terminal. | ssa_cfd | OpenFOAM Running, Solving & CFD | 1 | March 18, 2019 06:25 |
DPMFoam - Serious Error --particle-laden flow in simple geometric config | benz25 | OpenFOAM Running, Solving & CFD | 27 | December 19, 2017 21:47 |
Lookup tables | ali.m.1 | OpenFOAM Running, Solving & CFD | 2 | May 13, 2016 08:11 |
Convergence on anisotropic tetahedral meshes | pbo | OpenFOAM Running, Solving & CFD | 12 | December 14, 2010 12:59 |