No, you will need to type them following the tutorial...
The longest was to get a ``proper'' CAD model of the vessel. We had it made by the ship designers but it was full of topological inconsistencies (folds, degenerate faces etc...). It was a real pain to fix it. Once you have a proper orientable, manifold solid there is nothing more to do really.
Here is a parameter file (replace tangaroa.gts with your model)
1 0 GfsSimulation GfsBox GfsGEdge {} { Time { end = 3 } GtsSurfaceFile tangaroa.gts Refine 5 RefineSolid 9 Init {} { U = 1. } AdaptVorticity { istep = 1 } { maxlevel = 8 cmax = 1e-2 } OutputSolidStats {} stdout OutputTime { istep = 1 } stdout OutputBalance { istep = 1 } stdout OutputProjectionStats { istep = 1 } stdout OutputSimulation { start = 0.1 step = 0.1 } simulation-%03.1f { variables = U,V,W,P } OutputTiming { start = end } stdout } GfsBox { right = BoundaryOutflow left = BoundaryInflowConstant 1. }It took about 12 hours (and 100 MB RAM) on a single CPU 350 MHz Pentium (knowing that the maximum length of the model I use is about a third of the domain size).
As you saw in the tutorial, the meshing is automatic and follows user-defined criteria. Vorticity and gradient-based criteria for example, can be used. The level of refinement used for both the initial refinement and the adaptive refinement can both be functions of space, time, other variables etc...which give almost total flexibility. Other criteria can be added within the object-oriented framework of the code if necessary.
Sure. You can use something like:
GfsRefine 6 GfsRefineSolid 8which will first create a uniform level 6 grid and then add two extra levels (up to level 8) only in the cells cut by the solid boundary.
You could do this like that for example:
AdaptVorticity { istep = 1 } { cmax = 1e-2 levelmin = (x > 0 ? 6 : 0) levelmax = (x > 0 ? 6 : 7) }which would use a constant resolution (6 levels) on the right side of the domain (x > 0) and adaptive resolution (up to 7 levels) on the left side.
Use something like:
AdaptVorticity { maxlevel = 10 maxcells = 400000 cmax = 1e-2 }the maxcells option tells the adaptive algorithm to use a maximum of 400,000 cells to discretise the domain. When this maximum number is reached the algorithm minimises the maximum cost of the refinement by optimally distributing the cells across the domain. You have to be aware however that this means that the accuracy of the simulation will not be constant in time.
Are you sure your text editor does not include special characters in your files? (the infamous DOS line ending comes to mind).
GfsBox { top = Boundary { BcDirichlet U 0 } bottom = Boundary { BcDirichlet U 0 } left = Boundary { BcDirichlet V 0 } right = Boundary { BcDirichlet V 0 } }
What about this page of the tutorial? As described in the reference manual functions can depend on time (just use variable t). You should be able to use this to implement your boundary conditions.
The principle is relatively simple. Each GfsBox can take a pid argument which defines the number of the process on which the solution for this GfsBox will be computed. If you take the ``half cylinder'' example and do something like:
4 3 GfsSimulation GfsBox GfsGEdge {} { Time { end = 10 } Refine 6 GtsSurfaceFile half-cylinder.gts Init {} { U = 1 } OutputProjectionStats { step = 0.02 } stderr OutputSimulation { step = 1 } simulation-%d-%3.1f { variables = U,V,P,C } OutputTiming { start = end } stderr } GfsBox { pid = 0 left = BoundaryInflowConstant 1 } GfsBox { pid = 1 } GfsBox { pid = 2 } GfsBox { pid = 3 right = BoundaryOutflow } 1 2 right 2 3 right 3 4 rightif you run this using
% gerris2D half-cylinder.gfsit will run on one processor. If you now do
% mpirun -np 4 gerris2D half-cylinder.gfsit will run on 4 processor with each of the GfsBoxes assigned to a different processor. Gerris takes care of the communications necessary at the boundaries between GfsBoxes on different processors.
The data will be written in different files e.g:
vorticity-0.ppm, vorticity-1.ppm etc\dotswhere the number is the pid of the processor.
For a more complete description you will have to wait until I find the time to write the corresponding section in the tutorial.