Interpolating results between meshes in OpenFOAM with mapFields

Поделиться
HTML-код
  • Опубликовано: 26 дек 2024

Комментарии • 53

  • @thierrydaoud3458
    @thierrydaoud3458 2 года назад +1

    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!

    • @thierrydaoud3458
      @thierrydaoud3458 2 года назад

      but my question is: how can I adjust the "Target time" ?

    • @OpenFOAMJozsefNagy
      @OpenFOAMJozsefNagy  2 года назад

      In controlDict you can change between startTime and latestTime. In that case mapping will happen either for the one or the other time.

  • @noahzhang892
    @noahzhang892 3 года назад +1

    József, your video just saved my project. Huge thanks to you!

  • @MostafaTawfeek--
    @MostafaTawfeek-- 2 года назад

    thank you sir for your great work. i want to ask about How to use mapFields for every time step?

  • @jegga007
    @jegga007 11 месяцев назад

    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

    • @OpenFOAMJozsefNagy
      @OpenFOAMJozsefNagy  11 месяцев назад

      No, this is set up in a way that the two meshes have to be in two different case setups.

  • @mactone2
    @mactone2 2 года назад +1

    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.

  • @KillianWhyte
    @KillianWhyte Год назад

    You're a lifesaver! Thanks.

  • @viveksaravanan4619
    @viveksaravanan4619 4 года назад +1

    Thank you Jozsef for this useful contant

  • @mariarosales3535
    @mariarosales3535 Год назад

    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?

  • @tommyj7238
    @tommyj7238 2 года назад

    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?

  • @subbureddy3119
    @subbureddy3119 5 лет назад +1

    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
      @OpenFOAMJozsefNagy  5 лет назад

      Are you running cht simulations with multiple regions?

    • @subbureddy3119
      @subbureddy3119 5 лет назад

      @@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.

    • @OpenFOAMJozsefNagy
      @OpenFOAMJozsefNagy  5 лет назад

      @@subbureddy3119 Ok, then don't use source and targetRegion, this is for cht simulations. Did you try it without?

  • @chauhanhardik9940
    @chauhanhardik9940 5 лет назад +1

    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.

  • @daekiyeom3279
    @daekiyeom3279 3 года назад

    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?

  • @francootaola9172
    @francootaola9172 3 года назад

    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.

    • @OpenFOAMJozsefNagy
      @OpenFOAMJozsefNagy  3 года назад

      Did you decompose the target case?

    • @francootaola9172
      @francootaola9172 3 года назад

      @@OpenFOAMJozsefNagy yes the two of them are decomposed, and also I tried in same number of processors

    • @OpenFOAMJozsefNagy
      @OpenFOAMJozsefNagy  3 года назад

      @@francootaola9172 What is the output?

  • @ciupex007
    @ciupex007 5 лет назад +1

    Could you make a movie about the conjugate heat transfer and mapping between CFD mesh and FEM one?

    • @OpenFOAMJozsefNagy
      @OpenFOAMJozsefNagy  5 лет назад +1

      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.

  • @costantinobarro295
    @costantinobarro295 3 года назад

    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
      @OpenFOAMJozsefNagy  3 года назад

      A normal seems to be invalid. Maybe checkMesh can help?

    • @costantinobarro295
      @costantinobarro295 3 года назад

      @@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

    • @OpenFOAMJozsefNagy
      @OpenFOAMJozsefNagy  3 года назад

      @@costantinobarro295 Difficult to say. Sorry did you try on a single core?

  • @ashutoshsingh-et7vm
    @ashutoshsingh-et7vm 4 года назад

    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

  • @octaviobiols-sales7282
    @octaviobiols-sales7282 4 года назад

    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

    • @OpenFOAMJozsefNagy
      @OpenFOAMJozsefNagy  4 года назад

      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.

  • @nsd6297
    @nsd6297 3 года назад

    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.

    • @OpenFOAMJozsefNagy
      @OpenFOAMJozsefNagy  3 года назад +1

      I am not sure whether mapFields works for wegde BC. This would be something for the forum or the bug tracker of OpenFOAM.

  • @idreeskhan1629
    @idreeskhan1629 3 года назад

    nice explanation,could you sir explain how to find the ratio between two consecutive cells?

  • @jit104
    @jit104 5 лет назад

    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??

  • @petergrivalszki5847
    @petergrivalszki5847 5 лет назад

    Can I use mapFields with turbulence model change? maybe I have a k-epsilon simulation, and I want to change to k-omega....

    • @OpenFOAMJozsefNagy
      @OpenFOAMJozsefNagy  5 лет назад +1

      Well you won't be able to map e.g. omega. Other than that yes.

  • @낭만-p1t
    @낭만-p1t 5 лет назад

    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.

    • @낭만-p1t
      @낭만-p1t 5 лет назад

      my commander is 'mapFields -sourceTime latestTime ../folder1/'
      Is there anything I missed on this commander?

    • @OpenFOAMJozsefNagy
      @OpenFOAMJozsefNagy  5 лет назад

      @@낭만-p1t latestTime with '' ---> 'latestTime'

  • @kewu6250
    @kewu6250 5 лет назад +1

    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.

  • @mk_upo
    @mk_upo 5 лет назад +1

    Dear Jozsef, I think you should make a video on how to use swiftblock in blender. Thank you for your efforts! :)

    • @OpenFOAMJozsefNagy
      @OpenFOAMJozsefNagy  5 лет назад +1

      Is it working nicely these days?

    • @mk_upo
      @mk_upo 5 лет назад

      @@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.

    • @OpenFOAMJozsefNagy
      @OpenFOAMJozsefNagy  5 лет назад +1

      @@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.

  • @bideshsengupta9455
    @bideshsengupta9455 5 лет назад

    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.