- #1
member 428835
Hi PF!
I'm running a CFD (computational fluid dynamics) program OpenFOAM. Liquid is sucked from a tank, where the velocity at the tank outlet (suction point) is controlled by a python script. The boundary condition for velocity at the outlet is below, line 4 being the velocity prescribed at the outlet.
The python script changes the entire line 4 to a different input (same form, different float). When I run the python script, the volumetric flow rate is off by a lot. However, when I hard code the outlet BC and run it through bash, it runs fine.
THIS IS THE WEIRD PART: after running through bash, when I re-run through python, the volumetric flow rate is perfect. WHAT'S EVEN WEIRDER is after it works fine, if I copy the entire work file and run it again, the same error occurs.
Anyone have any experience with this? Very confusing for me.
I'm running a CFD (computational fluid dynamics) program OpenFOAM. Liquid is sucked from a tank, where the velocity at the tank outlet (suction point) is controlled by a python script. The boundary condition for velocity at the outlet is below, line 4 being the velocity prescribed at the outlet.
Code:
outlet
{
type fixedValue;
value uniform (0 -2.6254593e-03 0);
}
The python script changes the entire line 4 to a different input (same form, different float). When I run the python script, the volumetric flow rate is off by a lot. However, when I hard code the outlet BC and run it through bash, it runs fine.
THIS IS THE WEIRD PART: after running through bash, when I re-run through python, the volumetric flow rate is perfect. WHAT'S EVEN WEIRDER is after it works fine, if I copy the entire work file and run it again, the same error occurs.
Anyone have any experience with this? Very confusing for me.