|
[Sponsors] |
extract information from sample during simulation for use |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 10, 2011, 14:51 |
extract information from sample during simulation for use
|
#1 |
Member
|
Hi all,
I am using interFoam and wanna to extract the position of the interface every timestep for later use (for calculating height function). I found that I can use sample to extract the interface at alpha1 = 0.5. In /OpenFOAM-1.6/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.C there is a function to write the positions and index of points (s.points() and s.faces()) on the surface called writeGeometry(): 158 void Foam::sampledSurfaces::writeGeometry() const 159 { ............ 186 genericFormatter_->write 187 ( 188 outputDir, 189 s.name(), 190 s.points(), 191 s.faces() 192 ); 193 } What I did is create a function in sampleSurfaces.H like: 224 const vectorField iso_points() 225 { 226 return iso_points_; 227 }; and try to assign the value of s.points() to the value iso_points() later like: iso_points_ = s.points(); But then when I compiled, I got the error: sampledSurface/sampledSurfaces/sampledSurfaces.C:198: error: passing 'const Foam::vectorField' as 'this' argument of 'void Foam::Field<Type>:perator=(const Foam::Field<Type>&) [with Type = Foam::Vector<double>]' discards qualifiers I try different ways to get that information but it did not work. If you have any ideas or ways to extract that information for using in the solver, i would very appreciate to hear. Regards, Duong |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Fuse simulation | canopy | Main CFD Forum | 0 | February 11, 2009 04:24 |
about my old post | Rogerio Fernandes Brito | CFX | 1 | February 8, 2008 20:19 |
Transient simulation Error information | Li | CFX | 0 | July 25, 2007 12:27 |
Fire simulation using FDS from NIST | Jens | Main CFD Forum | 1 | January 22, 2004 02:53 |
3-D Contaminant Dispersal Simulation | Apple L S Chan | Main CFD Forum | 1 | December 23, 1998 11:06 |