I was struggling for two days since I was trying to do it by following the steps in the OpenFoamUserGuide and it wasn't working in any way. This video did it in an even easier manner. I really wanna thank you for that!
Dear Jozsef, thank you so much for all your highly informative and valuable videos! May I enquire, is there a technique to transfer the data of the flow fields of different meshes within the SAME simulation case (eg. Coarse mesh flow field is transferred to fine mesh at every timestep within the same case) instead of having two meshes in two different cases? Thank you so much for your kindest assistance!! - Jegga
Thank you Jozsef for tons of amazing tutorial. I tried the mapFields on the finer snappyHexMesh grid. It shows a lot of error (can't find the normal or something). The result from corse grid can't mapFields into the finer grid generated by snappyHexMesh. The boundary and geometry is the same, only difference is the snappyHexMesh grid refiner setting. My question is, is the mapFields can't used on snappyHexMeshed grid? The second questions is that shall I use the reconstructed result or the result from parallel processors? Thank you.
Hi sir, thanks for the videos shared about openfoam. Just to verify good practices, if we have mesh 'B' which has different patches than first mesh 'A' which is the one we have a solution and we want to map results onto mesh 'B' and start running simulation 'B', when you map it, 0/ of B is rewritten with the interpolated data of 'A'... my question is... as we could keep a backuo of original 0/ as 0.org/ in the case folder, where the BC are stated as written ascii functions, does mapFields only transfer data values of internalFields and keeps untouched our latest B.C. functions?
Hi, If I have a same of the same size, can I just copy the results from the latestTime in simpleFoam and paste them in the 0 folder of pimpleFoam as initial conditions?
Dear József Nagy Thank you so much for your videos this help a lot. But I tried using mapFields for a 3D simulation. To map the Outlet of the source on to the Inlet of the Target Using "mapFields -consistent -sourceTime 'latestTime' -sourceRegion 'Outlet' -targetRegion 'Inlet' ../path_of_source" Ended up with an error >>"cannot find file "points" in directory "Outlet/polymesh" in times 100 down to constant " how can we get rid of this error?
@@OpenFOAMJozsefNagy My Simulation is simple fluid flow through the 3D channel. I want to interpolate the data from Channel1 (simulation 1) Outlet to Channel2(simulation 2) Inlet. both channels have the same geometry but only the mesh resolution is changed.
what should I do if I want to map only one patch information not the whole domain? As , I want the result from the outlet patch of one case and use it as an inlet boundary condition for another case.
hi Jozsef, I am not succeding using mapFields for decomposed cases, does it work? for me with :"mapFields -consistent -parallelSource -parallelTarget -sourceTime 'latestTime' ../run_0_0_Part1/" it does not give any errors but when i go to the processors folder in the target case the time folder is not being created. I am missing something?(they even have the same number of processors) the same for the recomposed cases works correctly.
Cht is on my schedule on Patreon. With FEM I assume you mean structural mechanics, this is currently a topic, which is being developed, so it is not at the stage, where I fell comfortable offering a tutorial yet.
Hi, I'm having a problem with mapping the field from a coarser to a finer mesh with consistent geometry in parallel. When I run mapFieldPar ..directoryOfSource/ -consistent, the mapField.log return the error "Plane normal defined with zero length". Already tried with all the different mapMethod but te only thing that change, is that it return a different error ("cannot find entry value for patch..."). Any idea on why I'm not able to run in parallel?
@@OpenFOAMJozsefNagy checkMesh is not returning any error. The structure of the Allruns are the following: coarse mesh= blockMesh, decomposePar, runParallel snappyHex runParallel checkMesh, runParallel simpleFoam, reconstructParMesh, reconstructPar fine mesh= blockMesh, decomposePar, runParallel snappyHex, runParallel checkMesh, runParallel mapFieldsPar directory/ -consistent, runParallel simpleFoam, reconstructParMesh, reconstructPar
Hello sir Happy new year Please guide me I was simulating a channel and wants it's outlet to be inlet of my domain I tried mapfield but doesn't mapfield well rather it's putting whole channel results in my new domain I write source patch still not working please guide
Dear Jozsef, thank you for your video. May I ask what order is the interpolation method using? Is it a 1st order, 2nd order, etc.? Can we modify it and how? Thanks
With mapFields -help-full you can learn more. with -mapMethod you can choose between three methods. To find out just type mapFields -mapMethod blablabla and the three methods are written in the error message.
Good information.. but for my case it shows an error. "Source Patch axis has no face". I know why it shows error. Bcs the case has two wedge type and one axis( having face ( 0 3 3 0) ) boundary conditions. But I don't know how to map it. Pls guide me for that.
Thanks for the video...I have one question...what if I want to map one mesh to another with the internal field values the same but with a different boundary condition, like changing the outlet boundary to wall boundary condition??
Dear Jozsef, Thank you for the video. I have one question I want to use MapFields in another gepmetry (long and short). Then we did the command using -SourceTime instead of -consistent, but it didn't become interpolate value. Can you give me some advice on this? Thank you.
Dear Jozsef Can we do this every time step? I saw two threads from CFDOnline, they put the code of mapfields into solver. www.cfd-online.com/Forums/openfoam-programming-development/218505-how-get-cell-indices-manipulate-field-data.html#post745475 www.cfd-online.com/Forums/openfoam-programming-development/152170-runtime-mapfields-finemesh-coarsemesh.html I'm not sure if I need to merge those two solvers as a new solver before using mapfields code in the solver. Where to the put the code in the solver? Similar work in OpenFOAM has been found in journal paper, it states that "The computations on the two meshes are fully coupled, meaning that data (temperature from macro- to meso-, and solid fraction from meso- to macroscale) is exchanged in both directions at every time step via a linear interpolation framework" I'm not sure how the author implement the data exchange, limited information provided in the paper. Thanks in advance.
@@OpenFOAMJozsefNagy In my case, I got errors. But the guy himself made a video about how to make an structured mesh around a sphere. Btw. I am struggling with making a structured mesh around a sphere (smooth and dimpled). I created the mesh with Pointwise but it has negative Jacobian cells resulting in convergence problems. I am using snappyHexMesh as an alternative which does not seem to be bad. For testing I am running laminar but final goal is LES. Any suggestions appreciated.
Hi! Hope you are good and doing very well. I am facing a problem to do dot product of velocity and normal at wall boundary in createFields.H. I am trying to find collection efficiency at the wall in OpenFoam, but could not do it as I am getting error. I have written it as: scalarField betaCE ( IOobject ( "betaCE", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE ), U.boundaryMesh() & mesh.Sf() ); Error: createFields.H:130:11: error: ‘Foam::volVectorField {aka class Foam::GeometricField}’ has no member named ‘boundaryMesh’ U.boundaryMesh() & mesh.Sf() Can you please guide me to understand the mistake. Thank a lot for all your help.
I was struggling for two days since I was trying to do it by following the steps in the OpenFoamUserGuide and it wasn't working in any way. This video did it in an even easier manner. I really wanna thank you for that!
but my question is: how can I adjust the "Target time" ?
In controlDict you can change between startTime and latestTime. In that case mapping will happen either for the one or the other time.
József, your video just saved my project. Huge thanks to you!
I am glad.
thank you sir for your great work. i want to ask about How to use mapFields for every time step?
check mapFields -help-full
Dear Jozsef, thank you so much for all your highly informative and valuable videos! May I enquire, is there a technique to transfer the data of the flow fields of different meshes within the SAME simulation case (eg. Coarse mesh flow field is transferred to fine mesh at every timestep within the same case) instead of having two meshes in two different cases? Thank you so much for your kindest assistance!! - Jegga
No, this is set up in a way that the two meshes have to be in two different case setups.
Thank you Jozsef for tons of amazing tutorial. I tried the mapFields on the finer snappyHexMesh grid. It shows a lot of error (can't find the normal or something). The result from corse grid can't mapFields into the finer grid generated by snappyHexMesh. The boundary and geometry is the same, only difference is the snappyHexMesh grid refiner setting. My question is, is the mapFields can't used on snappyHexMeshed grid? The second questions is that shall I use the reconstructed result or the result from parallel processors? Thank you.
You're a lifesaver! Thanks.
Thank you Jozsef for this useful contant
Hi sir, thanks for the videos shared about openfoam. Just to verify good practices, if we have mesh 'B' which has different patches than first mesh 'A' which is the one we have a solution and we want to map results onto mesh 'B' and start running simulation 'B', when you map it, 0/ of B is rewritten with the interpolated data of 'A'... my question is... as we could keep a backuo of original 0/ as 0.org/ in the case folder, where the BC are stated as written ascii functions, does mapFields only transfer data values of internalFields and keeps untouched our latest B.C. functions?
You can define this with mapFieldsDict
Hi,
If I have a same of the same size, can I just copy the results from the latestTime in simpleFoam and paste them in the 0 folder of pimpleFoam as initial conditions?
Dear József Nagy
Thank you so much for your videos this help a lot.
But I tried using mapFields for a 3D simulation. To map the Outlet of the source on to the Inlet of the Target Using "mapFields -consistent -sourceTime 'latestTime' -sourceRegion 'Outlet' -targetRegion 'Inlet' ../path_of_source"
Ended up with an error >>"cannot find file "points" in directory "Outlet/polymesh" in times 100 down to constant "
how can we get rid of this error?
Are you running cht simulations with multiple regions?
@@OpenFOAMJozsefNagy My Simulation is simple fluid flow through the 3D channel. I want to interpolate the data from Channel1 (simulation 1) Outlet to Channel2(simulation 2) Inlet. both channels have the same geometry but only the mesh resolution is changed.
@@subbureddy3119 Ok, then don't use source and targetRegion, this is for cht simulations. Did you try it without?
what should I do if I want to map only one patch information not the whole domain? As , I want the result from the outlet patch of one case and use it as an inlet boundary condition for another case.
See my other reply.
Thank you Jozsef, This video is really helpful to me! However, I have one question. How can I overwrite the polyMesh in the Decomposed case?
hi Jozsef,
I am not succeding using mapFields for decomposed cases, does it work? for me with :"mapFields -consistent -parallelSource -parallelTarget -sourceTime 'latestTime' ../run_0_0_Part1/" it does not give any errors but when i go to the processors folder in the target case the time folder is not being created. I am missing something?(they even have the same number of processors) the same for the recomposed cases works correctly.
Did you decompose the target case?
@@OpenFOAMJozsefNagy yes the two of them are decomposed, and also I tried in same number of processors
@@francootaola9172 What is the output?
Could you make a movie about the conjugate heat transfer and mapping between CFD mesh and FEM one?
Cht is on my schedule on Patreon. With FEM I assume you mean structural mechanics, this is currently a topic, which is being developed, so it is not at the stage, where I fell comfortable offering a tutorial yet.
Hi, I'm having a problem with mapping the field from a coarser to a finer mesh with consistent geometry in parallel. When I run mapFieldPar ..directoryOfSource/ -consistent, the mapField.log return the error "Plane normal defined with zero length". Already tried with all the different mapMethod but te only thing that change, is that it return a different error ("cannot find entry value for patch..."). Any idea on why I'm not able to run in parallel?
A normal seems to be invalid. Maybe checkMesh can help?
@@OpenFOAMJozsefNagy checkMesh is not returning any error. The structure of the Allruns are the following:
coarse mesh= blockMesh, decomposePar, runParallel snappyHex runParallel checkMesh, runParallel simpleFoam, reconstructParMesh, reconstructPar
fine mesh= blockMesh, decomposePar, runParallel snappyHex, runParallel checkMesh, runParallel mapFieldsPar directory/ -consistent, runParallel simpleFoam, reconstructParMesh, reconstructPar
@@costantinobarro295 Difficult to say. Sorry did you try on a single core?
Hello sir
Happy new year
Please guide me
I was simulating a channel and wants it's outlet to be inlet of my domain I tried mapfield but doesn't mapfield well rather it's putting whole channel results in my new domain I write source patch still not working please guide
Dear Jozsef, thank you for your video. May I ask what order is the interpolation method using? Is it a 1st order, 2nd order, etc.? Can we modify it and how? Thanks
With mapFields -help-full you can learn more. with -mapMethod you can choose between three methods. To find out just type mapFields -mapMethod blablabla and the three methods are written in the error message.
Good information.. but for my case it shows an error.
"Source Patch axis has no face".
I know why it shows error. Bcs the case has two wedge type and one axis( having face ( 0 3 3 0) ) boundary conditions. But I don't know how to map it. Pls guide me for that.
I am not sure whether mapFields works for wegde BC. This would be something for the forum or the bug tracker of OpenFOAM.
nice explanation,could you sir explain how to find the ratio between two consecutive cells?
Thanks for the video...I have one question...what if I want to map one mesh to another with the internal field values the same but with a different boundary condition, like changing the outlet boundary to wall boundary condition??
Should work as well.
Can I use mapFields with turbulence model change? maybe I have a k-epsilon simulation, and I want to change to k-omega....
Well you won't be able to map e.g. omega. Other than that yes.
Dear Jozsef,
Thank you for the video. I have one question I want to use MapFields in another gepmetry (long and short). Then we did the command using -SourceTime instead of -consistent, but it didn't become interpolate value. Can you give me some advice on this? Thank you.
my commander is 'mapFields -sourceTime latestTime ../folder1/'
Is there anything I missed on this commander?
@@낭만-p1t latestTime with '' ---> 'latestTime'
Dear Jozsef
Can we do this every time step?
I saw two threads from CFDOnline, they put the code of mapfields into solver.
www.cfd-online.com/Forums/openfoam-programming-development/218505-how-get-cell-indices-manipulate-field-data.html#post745475
www.cfd-online.com/Forums/openfoam-programming-development/152170-runtime-mapfields-finemesh-coarsemesh.html
I'm not sure if I need to merge those two solvers as a new solver before using mapfields code in the solver.
Where to the put the code in the solver?
Similar work in OpenFOAM has been found in journal paper, it states that "The computations on the two meshes are fully
coupled, meaning that data (temperature from macro- to meso-,
and solid fraction from meso- to macroscale) is exchanged in both
directions at every time step via a linear interpolation framework"
I'm not sure how the author implement the data exchange, limited information provided in the paper.
Thanks in advance.
Dear Jozsef, I think you should make a video on how to use swiftblock in blender. Thank you for your efforts! :)
Is it working nicely these days?
@@OpenFOAMJozsefNagy In my case, I got errors. But the guy himself made a video about how to make an structured mesh around a sphere.
Btw. I am struggling with making a structured mesh around a sphere (smooth and dimpled). I created the mesh with Pointwise but it has negative Jacobian cells resulting in convergence problems. I am using snappyHexMesh as an alternative which does not seem to be bad. For testing I am running laminar but final goal is LES. Any suggestions appreciated.
@@mk_upo Take a look at the videos on my last Community Christmas Competition. There a couple of guys investigated the flow around a sphere.
Hi! Hope you are good and doing very well. I am facing a problem to do dot product of velocity and normal at wall boundary in createFields.H.
I am trying to find collection efficiency at the wall in OpenFoam, but could not do it as I am getting error. I have written it as:
scalarField betaCE
(
IOobject
(
"betaCE",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
U.boundaryMesh() & mesh.Sf()
);
Error:
createFields.H:130:11: error: ‘Foam::volVectorField {aka class Foam::GeometricField}’ has no member named ‘boundaryMesh’
U.boundaryMesh() & mesh.Sf()
Can you please guide me to understand the mistake. Thank a lot for all your help.
U.boundaryField()?
@@OpenFOAMJozsefNagy thanks a lot.