|
[Sponsors] |
mapField doesn't give correct Source and Target Time in openFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 4, 2023, 13:33 |
mapField doesn't give correct Source and Target Time in openFoam
|
#1 |
New Member
Join Date: Sep 2023
Posts: 7
Rep Power: 2 |
I am following the openFOAM tutorial's "lid-driven cavity case" and am doing the "cavityfine" part. I have ran the original "cavity" process and got a good result, and is trying to do "2.1.5.3 Mapping the coarse mesh results onto the fine mesh" by typing the mapField Command in the terminal. I got very similar outputs as shown in the tutorial, but their source and target time are both 0.5, while mine is 0. Could you tell me what happened and how to solve it?
I am using a native-windows version of OpenFOAM-v2306. |
|
October 17, 2023, 05:10 |
|
#2 |
New Member
Alex Krochak
Join Date: May 2022
Posts: 9
Rep Power: 3 |
Hello maxning,
the correct usage of mapFields, given your mesh topology is consistent is: mapFields -sourceTime xxx ../patchToSourceCase -consistent. Make sure that in the target directory in controlDict startTime is set equal to the sourceTime, I suspect this is the cause of your error. If your mesh is not consistent you need to setup a mapFieldsDict file. |
|
October 28, 2023, 12:07 |
|
#3 |
New Member
Join Date: Sep 2023
Posts: 7
Rep Power: 2 |
Sorry, is it like I can directly copy your code, or I have to change the pathToSourceCase to something else? Also, when you say make sure startTime is equal to sourceTime, do you mean go into controlDict and change it? Like originally it is startTime startTime, and now I have to change it to startTime sourceTime?
|
|
October 28, 2023, 12:14 |
|
#4 |
New Member
Join Date: Sep 2023
Posts: 7
Rep Power: 2 |
I changed xxx to 0.5, changed patchToSourceCase to cavity in your code, and, in cavityFine, change the startTime startTime to startTime sourceTime in controlDict. But I still only get Source Time = 0.5, Target Time equal 0
|
|
November 1, 2023, 03:43 |
|
#5 | |
New Member
Alex Krochak
Join Date: May 2022
Posts: 9
Rep Power: 3 |
Quote:
Sorry for the late reply, if you don't quote my post I don't get a notification. You need to change the pathToSource case to an actual relative path of our source directory relative to your target directory. This way the mapFields utility know where to actually read the input mesh and field data from. Otherwise you can't expect it to know what source case you want to use. Second, you need to specify: startFrom startTime; startTime 0; --< here you put timestep of the input field data you want to use. If you ran your source simulation for 10000 timesteps and your final data is in directory 10000 you put 10000 here. Third, you need to go in your source directory and take your boundary conditions folder (usually 0 or 0.orig) and copy this folder and rename it to ''10000''. Now you can run the command I've given previously. mapFields utility will read your source case, and then apply it to the input case where boundary conditions are given. I hope this helps Alex |
||
Tags |
map fields, openfoam 2306, tutorial, windows 10 |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] swak4foam for OpenFOAM 4.0 | mnikku | OpenFOAM Community Contributions | 80 | May 17, 2022 08:06 |
Using PengRobinsonGas EoS with sprayFoam | Jabo | OpenFOAM Running, Solving & CFD | 35 | April 29, 2022 15:35 |
AMI speed performance | danny123 | OpenFOAM | 21 | October 24, 2020 04:13 |
[foam-extend.org] Problems installing foam-extend-4.0 on openSUSE 42.2 and Ubuntu 16.04 | ordinary | OpenFOAM Installation | 19 | September 3, 2019 18:13 |
[OpenFOAM.org] Error creating ParaView-4.1.0 OpenFOAM 2.3.0 | tlcoons | OpenFOAM Installation | 13 | April 20, 2016 17:34 |