timeVaryingMappedFixedValue error
1 Attachment(s)
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: Attachment 27871 So it basically works, but somehow these strange errors appear. Any idea what this could be? What info do you need? |
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.
|
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? |
Hi, I am still struggling with this. Is anyone here who can help?
|
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++ -*----------------------------------*\ 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 |
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:
/*---------------------------------------------------------------------------*\ 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? |
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 : 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!!! |
All times are GMT -4. The time now is 00:37. |