problems on dsmc FreeStream Inflow Field Patch setup
Good morning, Im perfoming an validation experiment for a paper on dsmcFoam+
one of the simulation requirements is a non-uniform, vector list (U, T, numerical density) reading the source code i came across this boundary condition: Code:
/*---------------------------------------------------------------------------*\ Code:
boundary Code:
[0] cannot find file Code:
--> FOAM FATAL IO ERROR: [5] attempt to read beyond EOF best regards nanoR4K. |
The usage of dsmcFreeStreamInflowFieldPatch boundary condition is a bit different. To operate it as you intend, I would recommend:
1. Setup your simulation to work normally with dsmcFreeStreamInflowPatch (ie a uniform boundary condition), and I strongly recommend you set the inlet mesh geometry to be a nice uniform square/rectangle. 2. Run your dsmcFreeStreamInflowPatch for a few time steps to generate directories which save the state of the system at a given time (ie "0.00355"). Inside these are a number of files of type "volVectorField" and "volScalarField". We need these as a template to set up the custom boundary conditions. 3. Stop your simulation, and in "boundariesDict" change the boundary type for your inlet patch from "dsmcFreeStreamInflowPatch" to "dsmcFreeStreamInflowFieldPatch" and also replace "dsmcFreeStreamInflowPatchProperties" with "dsmcFreeStreamInflowFieldPatchProperties"; don't change or add anything else in that file except for those names for the patches you want to modify. 4. Now you need to set up the 3 custom boundary condition files in the "0" directory. Using the files generated earlier as a template, create a file named "boundaryT" in the "0" directory which is a volVectorField (by copying in for instance a file from the state directory "0.00355" which corresponds to the velocity of all the cells). When you open this file, change its name next to "object" to "boundaryT". Below that, you will see a couple of large vector lists, one for the internalField, and more below for each other boundary. Go to the vector list corresponding to your inlet patch; each vector (x y z) corresponds to the translational, rotational, vibrational temperature of each cell on that boundary. You can now change the values of each vector to match your desired boundary profile (you might need to play around to see the order that dsmcFoam reads the list onto the 2D boundary). You can ignore the values for the other patches / internalField, as they will be ignored by Foam (although they need to be left there for the syntax to work). 5. Repeat analogously for the velocity profile, by adding a "boundaryU" file to the "0" directory, again using a volVectorField file as a template. Here, each vector (x y z) is just the 3D velocity vector on the boundary patch. 6. Lastly, for number density, you need a volScalarField file, named "boundaryNumberDensity_<species name>" (eg boundaryNumberDensity_O2). 7. All set! |
Hello, have you ever encountered a problem with the calculation of automatic stops when running dsmcfoam+? This question has been bothering me.
|
All times are GMT -4. The time now is 00:48. |