Test request - 1D flow

About the development of the FEM module/workbench.

Moderator: bernd

KgoaOT
Posts: 66
Joined: Mon Jul 18, 2016 9:08 am

Re: Test request - 1D flow

Post by KgoaOT »

makkemal wrote:Can you post an updated example the earlier one is giving a number of errors
the example file can be found here
1DPipe.fcstd
(13.69 KiB) Downloaded 50 times
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Test request - 1D flow

Post by bernd »

KgoaOT wrote:
makkemal wrote:Can you post an updated example the earlier one is giving a number of errors
the example file can be found here
1DPipe.fcstd
Damn convergence problems ... Do I have the same problem as here ... viewtopic.php?f=18&t=20276&start=10#p156853 Michael does the example run for you ?


BTW: rebased on master and made it flake8 compatible. Furthermore I would implement the mesh tools for replacing the element name in the mesh tools module See https://github.com/berndhahnebach/FreeC ... fem1dfluid
User avatar
makkemal
Posts: 395
Joined: Wed Apr 29, 2015 12:41 pm
Location: South Africa
Contact:

Re: Test request - 1D flow

Post by makkemal »

Test file is working fine
I think broke it but it is working nicely.
I like the fact that you have to account for gravity in the the fluid.

The test not working (it may just be the operator)
1dtest.fcstd
(9.42 KiB) Downloaded 33 times
seen to be the split input file writer ?

It solves if I take that off
1dtest2.fcstd
(11.47 KiB) Downloaded 41 times
KgoaOT
Posts: 66
Joined: Mon Jul 18, 2016 9:08 am

Re: Test request - 1D flow

Post by KgoaOT »

makkemal wrote:Test file is working fine
I think broke it but it is working nicely.
I like the fact that you have to account for gravity in the the fluid.

The test not working (it may just be the operator)
1dtest.fcstd
seen to be the split input file writer ?

It solves if I take that off
1dtest2.fcstd

I have just included the "Split input writter implementation"

The branch can be found here: https://github.com/stoflap/FreeCAD/tree/FluidSection
bernd wrote:Damn convergence problems ... Do I have the same problem as here ... viewtopic.php?f=18&t=20276&start=10#p156853 Michael does the example run for you ?


BTW: rebased on master and made it flake8 compatible. Furthermore I would implement the mesh tools for replacing the element name in the mesh tools module See https://github.com/berndhahnebach/FreeC ... fem1dfluid
I am not experiencing any divergence problems on my system.
OS: Ubuntu 16.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.9909 (Git)
Build type: Unknown
Branch: FluidSection
Hash: 9dbb61202ecae63e957692075ea0a11a95124d77
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

Regards.
User avatar
makkemal
Posts: 395
Joined: Wed Apr 29, 2015 12:41 pm
Location: South Africa
Contact:

Re: Test request - 1D flow

Post by makkemal »

Thanks
Split input writer does not break things anymore.
However I cannot get any example to converge with more than just inlet outlet and single pipe in between
Can you post an example containing all implemented elements please ?
The reason one would want a 1D flow network is it would be very complex to solve with 3D CFD if you have a number of pipe connections etc

Suggestions
1. Change the "add reference" to "add/remove"
If you have a number of pipe sections/bends they will be the same pipe maning thus multiple selection will be useful.
2. Is it possible to have the selected bodies high lite when only highlighting the fluid section in the tree.
Having to open each fluid section individually to check network is tedious

For the rest Great work !
KgoaOT
Posts: 66
Joined: Mon Jul 18, 2016 9:08 am

Re: Test request - 1D flow

Post by KgoaOT »

makkemal wrote: Can you post an example containing all implemented elements please ?
I have attached example with all the possible elements:
Test.fcstd
(12.45 KiB) Downloaded 41 times
makkemal wrote: Suggestions
1. Change the "add reference" to "add/remove"


I have tried to do this, but it does not work like the other constraints.
What is expected is first for the user to select the shape( edge, vertex, face) and then click add.
But it works the other way around.

The branch is here: https://github.com/stoflap/FreeCAD/tree/FluidSection

Perhaps Bernd can help as I copied the way he implemented the Beam Section and Shell Section
makkemal wrote: Suggestions
2. Is it possible to have the selected bodies high lite when only highlighting the fluid section in the tree.


If one can select the object, look for what "References" the object contains and then highlighting should be easy.

Regards
User avatar
makkemal
Posts: 395
Joined: Wed Apr 29, 2015 12:41 pm
Location: South Africa
Contact:

Re: Test request - 1D flow

Post by makkemal »

I get the following error in Windows

Code: Select all

FemTools.setup_working_dir()  -->  self.working_dir = C:/ccxtmp
Traceback (most recent call last):
  File "C:\FreeCAD_compile\Mod\Fem\_TaskPanelFemSolverCalculix.py", line 168, in calculixFinished
    fea.load_results()
  File "C:\FreeCAD_compile\Mod\Fem\FemToolsCcx.py", line 229, in load_results
    self.load_results_ccxfrd()
  File "C:\FreeCAD_compile\Mod\Fem\FemToolsCcx.py", line 240, in load_results_ccxfrd
    ccxFrdReader.importFrd(frd_result_file, self.analysis, result_name_prefix)
  File "C:\FreeCAD_compile\Mod\Fem\ccxFrdReader.py", line 465, in importFrd
    m = readResult(filename)
  File "C:\FreeCAD_compile\Mod\Fem\ccxFrdReader.py", line 54, in readResult
    os.remove("inout_nodes.txt")
WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'inout_nodes.txt'
Work fine in linux
KgoaOT
Posts: 66
Joined: Mon Jul 18, 2016 9:08 am

Re: Test request - 1D flow

Post by KgoaOT »

makkemal wrote:I get the following error in Windows

Code: Select all

FemTools.setup_working_dir()  -->  self.working_dir = C:/ccxtmp
Traceback (most recent call last):
  File "C:\FreeCAD_compile\Mod\Fem\_TaskPanelFemSolverCalculix.py", line 168, in calculixFinished
    fea.load_results()
  File "C:\FreeCAD_compile\Mod\Fem\FemToolsCcx.py", line 229, in load_results
    self.load_results_ccxfrd()
  File "C:\FreeCAD_compile\Mod\Fem\FemToolsCcx.py", line 240, in load_results_ccxfrd
    ccxFrdReader.importFrd(frd_result_file, self.analysis, result_name_prefix)
  File "C:\FreeCAD_compile\Mod\Fem\ccxFrdReader.py", line 465, in importFrd
    m = readResult(filename)
  File "C:\FreeCAD_compile\Mod\Fem\ccxFrdReader.py", line 54, in readResult
    os.remove("inout_nodes.txt")
WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'inout_nodes.txt'
Work fine in linux
The problem is fixed and a few other bugs. The latest branch: https://github.com/stoflap/FreeCAD/tree/FluidSection
User avatar
makkemal
Posts: 395
Joined: Wed Apr 29, 2015 12:41 pm
Location: South Africa
Contact:

Re: Test request - 1D flow

Post by makkemal »

Nice Ofenste it is working well in Windows and Linux :D
You only need a few more fluid section types to support all of them.

I suggest reproducing the following exmaple
http://feacluster.com/CalculiX/ccx_2.11 ... ode13.html
and adding it to the unit tests
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Test request - 1D flow

Post by bernd »

makkemal wrote:I suggest reproducing the following exmaple
http://feacluster.com/CalculiX/ccx_2.11 ... ode13.html
and adding it to the unit tests
+1

and may be try to rebase on this branch since it will be in master soon, hopfully: https://github.com/berndhahnebach/FreeC ... its/femdev
Post Reply