CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

TimeVaryingMappedFixedValue best practice to extract subset points and fields

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

Like Tree2Likes
  • 2 Post By markusrehm

Reply
 
LinkBack Thread Tools Display Modes
Old   November 27, 2008, 01:48
Default Hi, I've been trying to fin
  #1
Senior Member
 
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 185
Rep Power: 8
podallaire is on a distinguished road
Hi,

I've been trying to find the best way of extracting the points of a patch and the different fields (U, p, ...) related to those points from a time directory in order to use the data for a timeVaryingMappedFixedValue patch. Using this as a first pass, I want to apply a fluctuations and create multiple time directories.

However, I'm not sure that using faceSet, cellSet and subsetMesh is the best way to go. The extracted subsetMesh gives me the list of point which I need for timeVaryingMappedFixedValue but the field files are not clean in a sense that all original patches are kept.

Any idea on how to generate this first set of data from patch in order to use it as a first pass for a timeVaryingMappedFixedValue patch ?

Best regards,

PO
podallaire is offline   Reply With Quote

Old   February 14, 2011, 11:56
Default
  #2
Member
 
Join Date: Apr 2010
Posts: 53
Rep Power: 7
bephi is on a distinguished road
Hello,
has anyone found out, how it is possible to achieve the points-file and the extracted U value in the time-directories to set up a timeVaryingMappedFixedValues case?

A first simulation is done and I have different U values at different times for the whole geometry. How can I extract them in a format for timeVaryingMappedFixedValue like in the pitzDailyExpInlet-tutorial?

With regards!
Philipp
bephi is offline   Reply With Quote

Old   August 17, 2011, 10:07
Default
  #3
Senior Member
 
Markus Rehm
Join Date: Mar 2009
Location: Erlangen (Germany)
Posts: 176
Rep Power: 8
markusrehm is on a distinguished road
Hello,

use the sample utility. In the sampleDict choose under surfaces "constantPlane".
Now use "surfaceFormat foamFile" and paste the output in the appropriate files. Pay attention to use faceCentres instead of points for the coordinates.

Markus
cfdonline2mohsen and Thamali like this.
markusrehm is offline   Reply With Quote

Old   July 31, 2013, 05:21
Default
  #4
New Member
 
Dan Pearce
Join Date: May 2013
Posts: 6
Rep Power: 4
Dan Pearce is on a distinguished road
I also seemed to struggle with this and after some head scratching came up with the sampleDict file that outputs the points, faces and facecentres for a selected patch. In this example, the selected patch is called "InletFace". I then ran the sample utility and copied the points file into the /boundaryData/InletFace folder and it seemed to work straight away.
Attached Files
File Type: txt sampleDict_example.txt (1.1 KB, 107 views)
Dan Pearce is offline   Reply With Quote

Old   May 21, 2014, 05:20
Default
  #5
Member
 
Niu
Join Date: Apr 2014
Posts: 42
Rep Power: 3
Z.Q. Niu is on a distinguished road
Dear Dan,
I has also gotten into this trouble! I has download your attached files, I also copy the data into <bundaryData/inlet>,but when I run the case,the error occurs:
Expected a '(' while reading VectorSpace<Form, Cmpt, nCmpt>, found on line 17 the label 10000

file: /home/zq/桌面/timeVaryingMpped2/constant/boundaryData/inlet/0/U at line 17.

From function Istream::readBegin(const char*)
in file db/IOstreams/IOstreams/Istream.C at line 94.
Is there some changes to the origin files generated by sample Utility?

Best Regards!
Z.Q. Niu
Z.Q. Niu is offline   Reply With Quote

Old   May 21, 2014, 08:16
Default
  #6
New Member
 
Dan Pearce
Join Date: May 2013
Posts: 6
Rep Power: 4
Dan Pearce is on a distinguished road
Hi Z.Q,
It has been a while since I looked at this but I don't think I had to do much to the points file, I just pasted in the standard openfoam header. What you are seeing however seems to be an error related to your U file at time zero rather than the points file itself. It would be helpful if you can let us know what version of OF you are using and post your 0/U file (or part of it if it's very large). I used a matlab script to read in experimental data and convert it to the correct time steps and write all the necessary U files and directories.

Dan
Dan Pearce is offline   Reply With Quote

Old   May 21, 2014, 10:25
Default
  #7
Member
 
Niu
Join Date: Apr 2014
Posts: 42
Rep Power: 3
Z.Q. Niu is on a distinguished road
Dear Dan,
Thank your quick reply very much! I has solved my problem, it is becasue I didn't add openfoam header as followed:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class vectorAverageField;
object values;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Average
(0 0 0)
I added open foam header manually, I'm using OF 2.2.0, my U profile in /boundaryData/inlet is sampled from previous model, and there are too much time step which need to be sampled, would you mind share your matlab script with me? I am a newer to Linux, and I am trying to use script to achieve above works quickly!

Best regard!
Z.Q. Niu
Z.Q. Niu is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
TimeVaryingMappedFixedValue irishdave OpenFOAM Running, Solving & CFD 28 May 28, 2015 13:37
TimeVaryingMappedFixedValue sunnysun OpenFOAM Running, Solving & CFD 12 October 30, 2013 16:22
TimeVaryingMappedFixedValue field creation johndeas OpenFOAM Running, Solving & CFD 22 April 2, 2010 12:10
Possible bug with timeVaryingMappedFixedValue jerome OpenFOAM Bugs 2 October 9, 2007 09:38
ICEMCFD: subset "smooth_show_map" Andy CFX 2 October 31, 2006 08:57


All times are GMT -4. The time now is 20:28.