|
[Sponsors] |
April 10, 2024, 10:51 |
Reading a case with different mesh
|
#1 |
New Member
Eva
Join Date: Jan 2024
Posts: 3
Rep Power: 2 |
Hello,
I am solving a flow (let's call it simulation0) that uses the solution of another simulation (let's call it simulation1) to compute some coefficients needed for the simulation. I read the variables from simulation1 like: Y_ref.set ( I new volScalarField ( IOobject ( name_Yref, location_simulation1, mesh, IOobject::MUST_READ, IOobject::NO_WRITE ), mesh ) ); But, "mesh" is the mesh of simulation0, so the dimensions don't match with simulation1. I tried to read the mesh of simulation1 like following, but I need runTime or an object similar which I don't know how to reach: Foam::fvMesh mesh1 ( Foam::IOobject ( Foam::fvMesh::defaultRegion, location_simulation1, runTime, Foam::IOobject::MUST_READ ) ); How can I read it? Eva. |
|
May 6, 2024, 04:52 |
reading different Meshes
|
#2 |
New Member
Felix Benz
Join Date: Jan 2020
Posts: 3
Rep Power: 6 |
Hi,
i guess this question is already up for a couple of days, but maybe this will help: If you want to read in a mesh from a different directory than constant (I assume here is your mesh from simulation0) you have to replace Foam::fvMesh::defaultRegion with the directory. e.g. Foam::fvMesh mesh1 ( Foam::IOobject ( "region1", // read the mesh from constant/region1 directory runTime.time().timeName(), // adjust the timestep here in case you have different meshes for different times runTime, Foam::IOobject::MUST_READ ) ); Best regards Felix |
|
Tags |
mesh, openfoam10, read |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Volume and Surface mesh taking a lot of time | ghost_rider1145 | FLUENT | 0 | March 20, 2024 12:36 |
[Commercial meshers] Problem with Mesh conversion from FLUENT Meshing to OpenFOAM | mn17jyf | OpenFOAM Meshing & Mesh Conversion | 3 | November 1, 2023 10:49 |
flow over cylinder in openFoam | saeed jamshidi | OpenFOAM Pre-Processing | 3 | August 11, 2023 16:16 |
execFlowFunctionObjects - unknown field problem | Toorop | OpenFOAM Post-Processing | 16 | March 14, 2016 04:25 |
[snappyHexMesh] No layers in a small gap | bobburnquist | OpenFOAM Meshing & Mesh Conversion | 6 | August 26, 2015 10:38 |