Automation HyperMeshCFD Manifold

Rosa Esquer Cerezo
Rosa Esquer Cerezo Altair Community Member
edited October 14 in Community Q&A

Hello professionals!

Im doing a simulation of a basic Manifold geometry. I want to automate few simulations of the same geometry but with different inlet velocity. I have set the parameter as 'inlet_vel' in HyperMesh and set it as boundary condition. I have made an Excel with the different velocities that i want that the inlet takes. I made a visual basic script to connect the excel with the tcl tool. I dont really know how to do this automation, i have this script in tcl but it doesn't do any simulation

Answers

  • acupro
    acupro
    Altair Employee
    edited October 14

    I see you're using HyperMesh CFD.  There may be a way to set this up through the GUI - but I'll have to do some digging on that.

    You could do this through an environment variable - and you want the average velocity to be 1.0, 1.5, 2.0, 2.5.  Let's say this is your command in the AcuSolve input file (exported from HyperMesh CFD - Export instead of Run):

    SIMPLE_BOUNDARY_CONDITION( "Inlet" ) {
    ...
    type = inflow
    inflow_type = average_velocity
    average_velocity = 1.0
    ...
    }

    There would be other lines in that command - but for this example, I'm only interested in the average_velocity line.  Let's change that to:

    average_velocity = Env( "Inlet_Ave_Vel" )

    Now the value will be retrieved from the environment variable Inlet_Ave_Vel

    And you would build a script something like:

    foreach vel ( 1.0 1.5 2.0 2.5 )
        setenv Inlet_Ave_Vel $vel
        acuRun      (plus other necessary options to the acuRun command)
    end

    Depending on your OS, etc, that script would need to be modified accordingly.  And on Windows, that script would be run from the AcuSolve Command Prompt.  That will then go through the loop for each value - creating a separate run for each value.