Skip to content

Simulation Failed #30

@mmegally

Description

@mmegally

Description

Traceback (most recent call last):
File "C:\Users\micha\Downloads\Pyvista_examples\Cube_Perfusion.py", line 25, in
sim.write_3d_fluid_simulation()
File "C:\Users\micha\miniconda3\envs\svv\lib\site-packages\svv\simulation\simulation.py", line 596, in write_3d_fluid_simulation
simulation_file, fluid_mesh = self.fluid_simulations[0]
AttributeError: 'Simulation' object has no attribute 'fluid_simulations'

Reproduction

import pyvista as pv
from svv.domain.domain import Domain
from svv.tree.tree import Tree
from svv.simulation.simulation import Simulation

cube = Domain(pv.Cube())
cube.create()
cube.solve()
cube.build()

t = Tree()
t.set_domain(cube)
t.set_root()
t.n_add(2)

Create Simulation Container for Synthetic Tree Object

sim = Simulation(t)

Build All Surface/Volume Meshes for 3D CFD Simulation

sim.build_meshes(fluid=True,boundary_layer=False)

Build and persist 3-D CFD input files

sim.extract_faces()
sim.construct_3d_fluid_simulation()
sim.write_3d_fluid_simulation()

Result: meshes + XML under sim.file_path (e.g. ./simulations/example/)

from svv.simulation.fluid.rom.zero_d.zerod_tree import export_0d_simulation

export_0d_simulation(t, outdir=sim.file_path + "/rom_0d")

Optionally stage 1-D parameters for multi-scale workflows

sim.construct_1d_fluid_simulation(time_step_size=1e-3, number_time_steps=2000)

Expected behavior

fluid_mesh should not be empty.

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct and Contributing Guidelines

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions