CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   buoyantFoam problem with meshToMesh (https://www.cfd-online.com/Forums/openfoam-programming-development/255503-buoyantfoam-problem-meshtomesh.html)

gmax April 12, 2024 09:59

buoyantFoam problem with meshToMesh
 
Hi everyone, I'm trying to make a simulation of a moving inflow, it should simulate the wearing out of an electrode. The Openfoam version is OF.org V10.

In this process I used dynamicMeshDict to make the mesh move, when the deformation of the mesh was no longer acceptable I wanted to do a meshToMesh.
In this step I have an error:
Code:

FOAM FATAL ERROR:
 V0 is not available

 From function const Internal& Foam::fvMesh::V0() const
 in file fvMesh/fvMeshGeometry.C at line 296.

I'm trying to understand what's wrong but comparing it with movingCone I don't think there's any error in the setting.



Searching online I found that this problem was present in XiFoam as "XiFoam: Removed redundant rhoEqn solution after mesh topology change". The git hash is

7dd5c4d3fac0704492a5b81f3315abe7d3443a6f .


I tried to look for some redundancy in this case too but I couldn't find anything. Does anyone know this error or how to fix it

?

gmax April 16, 2024 11:40

can anyone help me?

gmax April 17, 2024 12:22

At the moment I think the error occurs in this area of ​​the code:

Code:

        autoPtr<volVectorField> rhoU;

        if (rhoUf.valid())
        {
            rhoU = new volVectorField("rhoU", rho*U);
        }

      // Update the mesh for topology change, mesh to mesh mapping

        mesh.update()

I think something is interfering with mesh.update(). I tried to understand in update() of the MeshToMesh file what could go wrong but I still haven't been able to figure out what's wrong.if I comment mesh.update() the count continues correctly.


All fields are printed correctly (even V0). It makes me think something is going on with directories.

gmax April 23, 2024 03:48

it seems that the error is generated from this point, we are in fvMeshGeometry.C.


Code:

const Foam::volScalarField::Internal& Foam::fvMesh::V0() const
293 {
294
295    if (!V0Ptr_)
296    {
297        FatalErrorInFunction
298            << "V0 is not available"
299            << abort(FatalError);
300    }
301
302
303    return *V0Ptr_;
304 }

What I understand is that the *V0Ptr_ pointer is missing, inside the fvMesh.C inside the file I find a lot of information that has to do with V0Ptr_ does anyone know where the error could be?


All times are GMT -4. The time now is 09:30.