0

I have a Star-CCM (CFD software) java macro that tells the CFD simulation to run on my local machine,through the line:

simulation_0.getSimulationIterator().runAutomation();

I want to tell Star-CCM to run the simulation on a cluster (usually I use PuTTY for this, but this have to be automatic), via SSH. What should I change in this line?

Best regards, Carlos

I did not try anything yet, I'm a newbie in Java, so any help would be greatly appreciated.

2
  • Welcome to stackoverflow. It's not clear to me what you are trying to do. I've never seen macros in Java. Also note that Java is not JavaScript, so decide which you use and remove the extra tag. A minimal reproducible example would be helpful, including what command you currently run t achieve this. See also How to Ask. Commented Oct 9, 2023 at 22:17
  • I assume you're talking about this kind of Java macros so I've adjusted the tags. Commented Oct 10, 2023 at 10:24

1 Answer 1

0

I want to tell Star-CCM to run the simulation on a cluster (usually I use PuTTY for this, but this have to be automatic), via SSH. What should I change in this line?

You can try to follow this code:

import java.io.IOException;

import com.cdadapco.star.RemoteMachine;
import com.cdadapco.star.Simulation;

public class Main {

    public static void main(String[] args) throws IOException {
        String remoteMachineHostname = ...;

        RemoteMachine remoteMachine = new RemoteMachine(remoteMachineHostname);

        Simulation simulation = Simulation.getActiveSimulation();

        simulation.getSimulationIterator().runAutomation(remoteMachine);
    }
}
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for this, but I'm not sure if I would just substitute the referred line for that code. Can I send my whole java macro here? It's on line 74 and, for what I understand, already inside a Main.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.