Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Look into make_a_copy functionality for settings named object #3294

Closed
seanpearsonuk opened this issue Sep 12, 2024 · 3 comments · Fixed by #3535
Closed

Look into make_a_copy functionality for settings named object #3294

seanpearsonuk opened this issue Sep 12, 2024 · 3 comments · Fixed by #3535

Comments

@seanpearsonuk
Copy link
Collaborator

seanpearsonuk commented Sep 12, 2024

materials method make_a_copy returns string as follows:

>>> x=solver.setup.materials.fluid.make_a_copy(from_="water",to="water-2")
>>> x
"'water"

Rename goes like this (it returns a string list):

>>> solver.setup.materials.fluid.rename(old="bob", new="bobby")
["'bob"]

create behaves differently to make_a_copy. create returns an object. Why only this one?

>>> mysolid = solver.setup.materials.solid.create("mysolid")
>>> mysolid
<flapi.flobject.child_object_type object at 0x00000000D30002E0>
>>> mysolid.chemical_formula = "SiO2"
>>> mysolid.density = 2650
@prmukherj
Copy link
Collaborator

Discussion from Scrum (24/09/2024)

solver.setup.materials.fluid.make_a_copy(from_="water",to="water-2") -->> Should return python object like 'create'

solver.setup.materials.fluid.rename(old="bob", new="bobby") -->> Can be fixed from settings-api to not return anything

@prmukherj prmukherj self-assigned this Sep 24, 2024
@prmukherj
Copy link
Collaborator

prmukherj commented Nov 26, 2024

Current behavior in

PyConsole:
Image

PyFluent:
Image

Both are consistent and does not return anything. Need to look into 'make_a_copy' to return object.

'create' returns a string in PyConsole:
Image

but an object in PyFluent:
Image

Need to address this inconsistency.
cc. @mkundu1, @seanpearsonuk

@prmukherj
Copy link
Collaborator

Current behavior:
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants