CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

timeVaryingMappedFixedValue error

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

Like Tree2Likes
  • 2 Post By Thangam

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 10, 2014, 04:25
Default timeVaryingMappedFixedValue error
  #1
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
Hi all,

I ran a periodic pipe to get inlet profiles for k,omega and U for a second case.
Now, in the second case I imported the profiles with a timeVaryingMappedFixedValue patch. What I get is this:
k_error.png
So it basically works, but somehow these strange errors appear. Any idea what this could be? What info do you need?
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   January 15, 2014, 01:38
Default
  #2
Member
 
Thangam Natarajan
Join Date: Dec 2010
Location: Perth
Posts: 70
Rep Power: 16
Thangam is on a distinguished road
are the geometries same in both the cases? If same, you could try renaming the last time step (assuming you need the fields in the entire geometry) as 0 and start your second case. The other option is using mapFields -consistent. However, if you are mapping the values of a slice from your first case to the second case, I am not very sure and I would simply write out the values with sampleDict and paste them on my U,k and omega files as non-uniform values. About the image, my guess would be that if you have taken values from a decomposed case, rather than a reconstructed case there is a chance that these strange pixels could appear.
Thangam is offline   Reply With Quote

Old   January 15, 2014, 02:43
Default
  #3
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
Hi Thangam, thanks for your reply.
Just the geometry of 1st case outlet is the same as the second case inlet (pipe diameter are both the same), but the meshes are different.
I get the values by reconstructing my 1st case and run a sampleDict. Now I add headers to the files and put them into the /constant/boundaryData/INLET/ of the second case.

What do you mean by this?
"However, if you are mapping the values of a slice from your first case to the second case, I am not very sure and I would simply write out the values with sampleDict and paste them on my U,k and omega files as non-uniform values."

Also: I basically don't need the "timeVarying..." of the input. Is there any comparable patch for just a constant, but spacially variable input?
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   January 21, 2014, 11:29
Default
  #4
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
Hi, I am still struggling with this. Is anyone here who can help?
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   January 22, 2014, 00:25
Default
  #5
Member
 
Thangam Natarajan
Join Date: Dec 2010
Location: Perth
Posts: 70
Rep Power: 16
Thangam is on a distinguished road
Hi Rodriguez,

Sorry for the delay in reply. Im guessing the strange errors in the new mesh are due to improper renumbering since you just change the headers. have you tried mapFields dict? if not, you might want to try this:

1) you will need a mapFieldsDict file in your system directory(of the target case in which u want the fields imposed) which has two parts in the file. The mappedpatch and the cutting patch. check the file below

Code:
/*--------------------------------*-  C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.1.x                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      mapFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

patchMap        ( inlet outlet );

cuttingPatches  (inlet);


// ************************************************************************* //
here the inlet is the name of the patch(target case) where you want the values imposed and the outlet is the name of the patch which is the source of all the values. The cutting patches is where you want the values in the target.

2) Then rename the time folder of the source case which you want the fields from(for example if you want the values from the 2000th time folder,rename it to 0) because mapfields maps only from the 0th time folder of the source. (you may wanna do this entire exercise in a separate folder having these two case folders alone for a start!)

3) run mapFields ../<sourcecase> from the terminal of your target case.

4) once successfully mapped, now check your U,p,k files whether the values are in the right place below the inlet boundary field. Dont worry about openfoam wrting values at every point in the mesh.That is how your errors during display of mesh are going to be solved. Ideally you want values to be fixed in time and varying spatially at the inlet. So, this should work.visualize it to confirm.

let us know how it goes.

cheers.
Thangam
RodriguezFatz and charmc like this.
Thangam is offline   Reply With Quote

Old   January 22, 2014, 06:14
Default
  #6
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
Hey Thangam,
thanks for your help. Do you know how I choose which fields I want to map to the "new" case?

Currently mapFields crushes with the error message:
Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.2                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.2.2-9240f8b967db
Exec   : mapFields ../../pipe_flow/dummy/
Date   : Jan 22 2014
Time   : 11:07:33
Host   : "OptiPlex-990"
PID    : 20116
Case   : /home/mertmann/Vortex/Grundmodell/SAS
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Source: "../../pipe_flow/dummy" ""
Target: "/home/mertmann/Vortex/Grundmodell" "SAS"

Create databases as time

Source time: 0
Target time: 0
Create meshes

Source mesh size: 549900    Target mesh size: 1226536


Mapping fields for time 0

    interpolating p
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigSegv::sigHandler(int) at ??:?
#2   in "/lib/x86_64-linux-gnu/libc.so.6"
#3  
 at ??:?
#4  
 at ??:?
#5  
 at ??:?
#6  
 at ??:?
#7  
 at ??:?
#8  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#9  
 at ??:?
Maybe this is because my first (source) case is a periodic pipe and I need to interpolate at the inlet (with periodic BC). On the other hand, I don't want to interpolate pressure, so maybe the error disappears when I switch off pressure interpolation.

Edit:
Alright, I read here:
http://www.cfd-online.com/Forums/ope...-inlet-bc.html
That my outlet (source case) needs to be at the same position as my inlet (new case). Is that true? Can I put in this offset afterwards?
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   January 22, 2014, 11:15
Default
  #7
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
I remeshed the first (source) case, so that the output of that case is at exactly the same z-position as the inlet of my second case.
The meshes are not conformal.

During the "mapFields" I get tons of warnings:
Code:
--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices> Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&, label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 1037820, 4(127903 362851 362901 128003), produces a valid tet decomposition.
But the results looks fine anyway.
By the way: You can run mapFields with "-sourceTime xyz" to take the data from any time step of the source. No need to rename the files.

I am going to write tomorrow, when I know if my new case works.

Thanks again!!!
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Reply

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
[swak4Foam] GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh gschaider OpenFOAM Community Contributions 300 October 29, 2014 19:00
c++ libraries and solver compiling vaina74 OpenFOAM Installation 13 February 3, 2012 18:43
[OpenFOAM] Saving ParaFoam views and case sail ParaView 9 November 25, 2011 16:46
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 18:51
user defined function cfduser CFX 0 April 29, 2006 11:58


All times are GMT -4. The time now is 11:38.