How to change mesh size at runtime
In my model I want to be able to specify the length scales of my mesh at run time so that I don't always have to change the blockMesh file and run "blockMesh -case xyz" just to change my mesh size.
So what I want to do is use blockmesh to make my mesh with unit length and then at runtime just multiply the grid spacing by my actual length. Is this possible to do? I'm thinking that all I would have to do is find a way to multiply the mesh.deltaCoeffs() by my desired lengths. How can I do this? |
pointField newPoints = mesh.points();
//modify newPoints mesh.movePoints(newPoints); |
Thanks eugene, this worked in changing my mesh, but when I use it I'm now getting an error at runtime that says:
Code:
V0 is not available Code:
const volScalarField::DimensionedInternalField& fvMesh::V0() const PS. To change my mesh all I did was: Code:
|
It appears the fvMesh now either requires that you set up a field V0 or a field meshPhi (in which case V0 is calculated automatically).
A bit irretating really. The only reasonable way to make this work without extra coding is to specify a flux field meshPhi in your starting time directory. Just use phi as a template and set everything to 0. |
All times are GMT -4. The time now is 19:59. |