Hi guys, I am trying to do something very similar to what you are trying to do. I will post what I have discovered so far relating to my problem and hopefully it can help yours. I am sick of mapFields problems - I just want to solve this!
So far I have:
The target mesh is thus 'finer' than the source file. I.e. it has more cells, points and faces. System architecture:
What I do:
*Note: heliostat is the STL file/object I have added into the farfield. Code:
patchMap Code:
Source: "." "blah" This method has worked for me when I leave mapFields blank, but of course, but only when I go from a fine to a coarse mesh. In this case, it mapped everything from Source to Target 3692 as nonuniform lists, to which I could add my extra BC for 'heliostat' at the end. (supplementary question: can I do this?) I have tried messing around with mapFields, by leaving out parts of cuttingPatches and patchMap, but it hasn't worked (I get the above output where it accepts the command but doesn't do anything). I WAS using 2.3x but if you get this error: Code:
Source: ".." "frac1" Target: "/home/ripuvm/OpenFOAM/ripuvm-2.3.x/multiFrac/cases/Consecutive1Well" "frac2" Create databases as time Case : ../frac1 nProcs : 1 Source time: 133 Target time: 54 Create meshes Source mesh size: 68670 Target mesh size: 83482 Creating and mapping fields for time 133 Creating mesh-to-mesh addressing for region0 and region0 regions using cellVolumeWeight --> FOAM FATAL ERROR: Plane normal defined with zero length Bad points:(15.24 -114.3 -22.86) (15.24 -106.68 -22.86) (15.24 -99.06 -22.86) From function void plane::calcPntAndVec ( const point&, const point&, const point& ) in file meshes/primitiveShapes/plane/plane.C at line 116. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) in "/opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #1 Foam::error::abort() in "/opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #2 Foam::plane::calcPntAndVec(Foam::Vector<double> const&, Foam::Vector<double> const&, Foam::Vector<double> const&) in "/opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #3 Foam::tetOverlapVolume::tetTetOverlapVol(Foam::tetPoints const&, Foam::tetPoints const&) const in "/opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/libmeshTools.so" #4 Foam::tetOverlapVolume::cellCellOverlapVolumeMinDecomp(Foam::primitiveMesh const&, int, Foam::primitiveMesh const&, int, Foam::treeBoundBox const&) const in "/opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/libmeshTools.so" #5 Foam::meshToMeshMethod::interVol(int, int) const in "/opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/libsampling.so" #6 Foam::cellVolumeWeightMethod::calculateAddressing(Foam::List<Foam::List<int> >&, Foam::List<Foam::List<double> >&, Foam::List<Foam::List<int> >&, Foam::List<Foam::List<double> >&, int, int, Foam::List<int> const&, Foam::List<bool>&, int&) in "/opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/libsampling.so" #7 Foam::cellVolumeWeightMethod::calculate(Foam::List<Foam::List<int> >&, Foam::List<Foam::List<double> >&, Foam::List<Foam::List<int> >&, Foam::List<Foam::List<double> >&) in "/opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/libsampling.so" #8 Foam::meshToMesh::calcAddressing(Foam::polyMesh const&, Foam::polyMesh const&) in "/opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/libsampling.so" #9 Foam::meshToMesh::calculate() in "/opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/libsampling.so" #10 Foam::meshToMesh::meshToMesh(Foam::polyMesh const&, Foam::polyMesh const&, Foam::meshToMesh::interpolationMethod const&, Foam::HashTable<Foam::word, Foam::word, Foam::string::hash> const&, Foam::List<Foam::word> const&) in "/opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/libsampling.so" #11 in "/opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/bin/mapFields" #12 in "/opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/bin/mapFields" #13 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #14 in "/opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/bin/mapFields" Program received signal SIGABRT, Aborted. 0x00007ffff4260425 in raise () from /lib/x86_64-linux-gnu/libc.so.6 ... then I have been led to believe this is a problem with mapFields in 2.3. OpenFoam 2.2 is supposed to work, but the creators have noticed this and have reverted back to 2.2 functionality in 3.0x. So I downloaded 3.0x and now in stead of getting this error with cuttingPatches it accepts it, but doesn't do anything. I feel like there is an issue with how it is reading the points or something - or the way the files are set up? If I have any development on the matter I will post, but at the moment I am quite stuck. Any help would be much appreciated by myself and, I'm guessing, MANY OF users. Kind regards, Jade |
Wow found a possible solution:
3 Attachment(s)
Back again!
Ok, so I managed to successfully mapFields with everying, including my cuttingPatch of heliostat, filled out above. What is also great, is that the cuttingPatch BC's are also mapped into the list of field numbers of the mapped solution files from source. Here's what I did:
The number of faces indicating that the coarse source mesh has been mapped onto the fine target mesh is also indicated at the top of these new files. I have to wait until Monday to run it. I will let you know how it goes. |
Hello everybody,
I found this thread while I was searching for mapping methods. In my case, I want to map a fully developed flow profile to a different inlet. Situation: Run a simulation of a tube (l=1m), sample at 0.9m and use this "cut" as inlet BC for a different case 2. Meshes are not the same... I tried meshFields, but I can only map an overlapping volume. Is there a way to map a cutting plane to the inlet of case 2? Thanks a lot for your info Regards |
Dear sisetrun,
Could you find any solution for this problem? Please let me know since I have the same issue. Thanks. Elham |
Hey Elham.,
I managed it by sampling a fully developed flow from a pipe. Use "foamFile" as output in the sampleDict. Then you can have a look at incompressible/simpleFoam/pitzDailyExptinlet. In your constant directory, create a folder boundaryData and in this folder another one with the name of your inlet patch. Within this inlet-folder, your copy your points from sampleDict and a third folder "0" where you put your "U" file. make sure, that you add the OpenFoam header: Quote:
Quote:
Regards |
Dear sisetrun,
Thanks for prompt reply. I have followed your instruction and sampled my inlet patch. Now I have points, U and P of inlet. But I don't know where should I assign BC for patch, since I have U and P ? Thanks. Elham |
And another question:
Should I execute mapFields now? |
Hey Alham,
there is no need for mapFields. Set the BC in your case/0 as shown above. In the constant/boundaryData/inlet/0/U is just the list of values for your points located in constant/boundaryData/inlet/points. This "plane" or " Circle" is taken as inlet BC for your geometry. For p it is a scalar and for U a vector... If you want to simulate a tube, just use U and set the p BC in case/0 to zeroGradient as usual. With this settings, you have a zeroGradient pressure at the inlet and for U you get the desired U profile |
Dear sisetrun,
Thanks. It took a day to manipulate and run the case succesfuly but you gave me the right points. Cheers, Elham |
Hello Sisetrun,
I have quite same problem with your case. I still not clear about how to map the inlet data onto another case. After creating the BoundaryData folder and setting inlet BC as timevaryingMappedFixedValue as you described in your case, what do I need to do in next step so that the inlet data can be mapped? Or is it already mapped and I can run the solvers directly? Looking forward to your reply. Thank you in advance. Best regards, Esther |
Hey Esther,
the setup shut be fine...just run your case and with timevaryingMappedFixedValue as BC and the profile is mapped. Quote:
|
Dear Sisetrun,
According to the points you gave me I found out reason of the problem, now it works. Thank you for your help. cheers Esther |
lagrangian mapField
I want to separate some boundaries to some walls which had been merged into one wall.
They are some walls of a combustion chamber. particles come into chamber to combust. I mapField them by mapFieldDict, but O.F only maps lagrangian datas. What can I do? |
Hey amin_jalalian,
I do completely get your problem. Can you please add a picture or try to be more precise? |
mapField Euler-Lagrange field with new wall.
2 Attachment(s)
Quote:
I want to mapField from previous results. What can I do now? When I adjust mapFieldsDict in target folder to this: Code:
patchMap ( ); O.F only maps lagrangian results. Excuse because of poor english. |
Hey,
with mapFields, as far as I know, you can do the following things: -map fields from one case to a different case, so you can map the whole field from the old case to your new one. If the geometry is the same, use mapFields -consistant -map patches from old one to knew one by the name of each pactch -you can use transformPoints -translate to translate one of your meshes. Then you can map the overlapping part I have just maped U,p,k... fields. Though I do not have any experiences with lagrangian so far. |
Quote:
Thanks What does "transformPoints -translate" command do briefly? |
use transformPoints -translate '(x y z)' in the terminal to translate the Mesh of your current working directory.
FYI: with surfaceTransformPoints -translate (or -scale) input.stl output.stl you can manipulate your stl geometry |
1 Attachment(s)
Quote:
I am trying something similar and I tried the approach presented above but no luck till now. I have two geometries with different mesh size and one different patches. Attached the images of source and target geo. I am trying to use the mapFieldDict for the cases and following is the what mapFieldDict looks like. Code:
// List of pairs of source/target patches for mapping Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Is mapField capable of doing what I am trying to do.?? Thanks in advance. |
Hey,
sorry for the late reply, I have been on holiday :)! I did not try such a geometry yet, but I think that the problem is in the bottom of your geometry. In the source, you have the gap in the x-axis. This gap is not present in the target. The gap also leads to different front and back geometries... Is it possible to map the inlet, outlet and the top? Cheers |
All times are GMT -4. The time now is 01:08. |