generation of boundaryData files for timeVaryingMappedFixedValue
Dear foamers,
I'm trying to generate the boundaryData files (to be read by timeVaryingMappedFixedValue) from a previous run with icoFoam. That is, I want to save the values of U and p at the outlet of a channel (U and p at the outlet are transient and nonuniform) in order to be read as inlet boundary conditions (in a subsequent run) once the BoundaryData files have been created. Mesh at the channel inlet and outlet is the same so really no interpolation is needed. I've been trying to manipulate the sample utility (using surface at the outlet patch) to write the boundaryData files but canīt really get the appropiate format of the points, U and p files. I'd be very grateful if someone can give me a hint of how to solve this problem. |
This is exactly what I would like to do as well.
I could probably write a script to parse the mesh for locations on the boundaries of interest then look for the U/p values in the solution and format a boundaryData file from that. There must be an easier way, right? or has someone done this already? |
Just in case anyone else stumbles upon this:
add the following lines either to functions in controlDict or sampleDict Quote:
|
Quote:
|
Quote:
|
It is not showing any error but not creating any dictionary with boundaryData.
FoamFile { version 2.0; format ascii; class dictionary; location "system"; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application pimpleFoam; startFrom startTime; startTime 0; stopAt endTime; endTime 10; deltaT 0.01; writeControl timeStep; writeInterval 100; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression off; timeFormat general; timePrecision 6; runTimeModifiable true; functions { #includeFunc writeCellCentres #includeFunc probes #includeFunc R #includeFunc turbulenceIntensity fieldAverage1 { type fieldAverage; libs ("libfieldFunctionObjects.so"); writeControl writeTime; fields ( U { mean on; prime2Mean on; base time; } p { mean on; prime2Mean on; base time; } ); } surfaces { type surfaces; libs ("libsampling.so"); writeControl writeTime; surfaceFormat foam; fields ( U ); interpolationScheme cell; surfaces ( xNormal { type cuttingPlane; planeType pointAndNormal; pointAndNormalDict { point (1 1 1); normal (1 0 0); } interpolate false; } ); } sampledPlanes { type surfaces; functionObjectLibs ("libsampling.so"); outputControl timeStep; outputInterval 1; enabled true; surfaceFormat boundaryData; fields (U); interpolationScheme cellPointFace; surfaces ( center { type patch; patches (outlet); interpolate false; } ); } } It seems like the command is not functional. |
All times are GMT -4. The time now is 13:54. |