Use sampled data from previous run as boundary condition for new setup
I have a quite large domain where I calculate flow around an object using interFoam. For simulated water waves as input, which are periodic (regular waves), I now want to "pick" a smaller part around the object out of this domain, and simulate only this are as a new case, like a submesh.
As boundary conditions for this new case, I want to sample data from the large domain run (completely run before) using planes that are directly located at the positions of the boundaries of the new domain. Values of U, p, k, omega shall be stores for several time steps of the (large domain) run and then made available for the new (small domain) run, which shall be used as periodically repeated boundary values.
Has anybody an idea how this can be done the best way - or better: done this before?
A view things have come to my mind:
- I know that mapFields can be used to map data between domains, but I don't think it can be used to map boundary values. Or am I wrong here?
- I read about timeVaryingMappedFixedValue and timeVaryingUniformFixedValue. What I would need is a combination of both. uniformFixed has an option outOfBound "repeat" that I would need. But it only works for a uniform field. mappedFixed uses values for defined points, but is there an option like outOfBound "repeat"? Furthermore, how can the value/point structure for mappedFixed be generated?
- Another idea was to do all this during runtime, e.g. using a subMesh. But then I have the problem of wasting precessors, as some of them (lying in the large domain only) have nothing to do...
- what about groovyBC?
One other thing connected to this: in the small domain (which is water only), I want to use another solver, e.g. pimpleFoam as no two phases are present. Will there be any problem doing this?
Any hints are highly appreciated!
you can use mapFields to map the boundary values. Define the patchMap entry like
An idea how to combine solvers was developed by David Gaden:
Never tried this one, but the thread was on my watch list since then ;-)
thanks for your quick reply. Another one working on saturday evening...
I had a further look at mapFields. At least what I can see from the picture is that the cuttingPatches entry could work - the boundaries of my new domain are lying somewhere in the large domain, i.e. boundaries cannot be directly mapped. I'm nevertheless afraid that this is only working for mapping the "initial stage", isn't it? Please correct my when I'm wrong! What I need is a continuous mapping as boundary values for the new case are (periodically) changing with time. Whereas... this could maybe done during runtime?
I also had a look at the multiSolver approach, which seems quite interesting! As far as I can see, it is only working if the domain remains the same...
Maybe to make it clearer: There is no direct coupling between my domains, the first one is only used as a "provider" for the boundary condition values.
Did you get around this issue? I need a similar capability to interpolate fields not just to a plane but an entire sub-domain itself with a different mesh at run time and in parallel. Anything you've learnt on this front would be very useful to me.
|All times are GMT -4. The time now is 08:52.|