ansys / pyfluent

Pythonic interface to Ansys Fluent
https://fluent.docs.pyansys.com
MIT License
256 stars 41 forks source link

`additional_arguments` is not supported for container launch #2624

Closed mkundu1 closed 4 months ago

mkundu1 commented 5 months ago

Try out solver = pyfluent.launch_fluent(additional_arguments="-t2") in a Fluent container launch environment. Fluent container is launched with the following command

mkundu@AAPAomeLhXO1rdt:/mnt/d/ANSYSDev/PyFluentDev/pyfluent$ docker ps --no-trunc
CONTAINER ID                                                       IMAGE                            COMMAND                                                                                          CREATED          STATUS         PORTS                                           NAMES
46c6cfcf0a5360f736f20379b7c9a7889458b1efa94ad6896c1705d049ab83f3   ghcr.io/ansys/pyfluent:v24.2.0   "/ansys_inc/v242/fluent/bin/fluent -gu -sifile=/mnt/pyfluent/serverinfo-ncrs3ybj.txt 3ddp -gu"   10 seconds ago   Up 9 seconds   0.0.0.0:48813->48813/tcp, :::48813->48813/tcp   mystifying_turing
hpohekar commented 5 months ago

@mkundu1 @seanpearsonuk

Following test is failing in this PR after doing following change.

https://github.com/ansys/pyfluent/pull/2650/files#diff-1ddb020aec61b14c762b419b1816d54721d6f90e625495650de70556a91f05e4

image

We were getting error as - None type object is not iterable because addArgs were None so we have added check for non empty addArgs then following test started to fail.

https://github.com/ansys/pyfluent/actions/runs/8629019261/job/23654040820?pr=2650

image

mkundu1 commented 5 months ago

@mkundu1 @seanpearsonuk

Following test is failing in this PR after doing following change.

https://github.com/ansys/pyfluent/pull/2650/files#diff-1ddb020aec61b14c762b419b1816d54721d6f90e625495650de70556a91f05e4

image

We were getting error as - None type object is not iterable because addArgs were None so we have added check for non empty addArgs then following test started to fail.

https://github.com/ansys/pyfluent/actions/runs/8629019261/job/23654040820?pr=2650

image

The default value of the additional_arguments argument is "" in launch_fluent. The above check is based on the assumption that additional_arguments will never be None.

hpohekar commented 5 months ago

@mkundu1

I see. Right, got it. It should be "" and not None because None is coming from kwargs.get("additional_arguments").

We will update it to kwargs["additional_arguments"].

Thank you.