|
[Sponsors] |
Is it possible to use MapFields while keeping original target field |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 15, 2018, 02:40 |
Is it possible to use MapFields while keeping original target field
|
#1 |
Member
Join Date: Oct 2015
Location: Finland
Posts: 39
Rep Power: 11 |
Hey,
Say I have this cube with dimensions 10m in each direction. I create another small box with 1m length and resolve 3D TG vortices with some added random noise so it gives me a pseudo-random turbulence field. Now I want to map this small box recursively into the big box, starting from bottom corner all the way to the top. Since the small box boundary conditions are cyclic in theory it should give me a fully resolved turbulence field. In this example I want to put 10*10*10 = 1000 small boxes into the big box, so I wrote a shell script to do that only realize once mapFields is run, it clears the target fields and fully overwrites the source fields. Code:
# This parameter defines how many boxes you will put in each direction Lratio=4 n=1 boxSize=1 while [ $n -le $Lratio ] do cd ../boxTurb16 tranformPoints -translate "($boxSize 0 0)" cd ../boxTurb64 mapFields ../boxTurb16 -consistent n=$(( n+1 )) done Best, Bulut EDIT : Well this is embarrassing but I couldn't figure out to delete this thread. I have a typo in "transformPoints" line of my shell script. It actually does not overwrite anything, I was just not careful enough to catch it didn't execute that line in the log files. Just gonna leave this post here so if someone needs to use the same idea they'd see it works. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
New Solver error Foam::error::printStack | upuli | OpenFOAM Running, Solving & CFD | 4 | May 11, 2018 02:43 |
OpenFOAM floating point Error | upuli | OpenFOAM Programming & Development | 5 | June 20, 2016 04:19 |
mapFields Error with snappyHexMesh Source Added Layers | sherif35 | OpenFOAM Pre-Processing | 0 | September 29, 2014 18:01 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
Problem with rhoSimpleFoam | matteo_gautero | OpenFOAM Running, Solving & CFD | 0 | February 28, 2008 07:51 |