Could you try closing FreeCAD and in the same terminal type the commandmakkemal wrote:The file is empty
Code: Select all
ideasUnvToFoam -case /tmp/case /tmp/case/case.unv
Thanks
Moderator: oliveroxtoby
Could you try closing FreeCAD and in the same terminal type the commandmakkemal wrote:The file is empty
Code: Select all
ideasUnvToFoam -case /tmp/case /tmp/case/case.unv
Our idea here was not to submit the code yet, but just to incorporate the CFD workbench into its own fork of FreeCAD as we understood this to be the accepted practice. We felt it would be easier to test this way as it would not be necessary to copy or link the CFD code, settings, and material properties into different parts of an existing FreeCAD build - they are already installed into the right place when you do the build. It might also avoid the ambiguity of someone running it with a different version of FreeCAD than it was tested with. We are, of course, happy to submit pull requests to you. Does this make sense? How would you like to proceed?qingfeng.xia wrote: It is a bit early to commit directly to official
https://github.com/jaheyns/FreeCAD.git, please fork the cfd module and send pull request on coding style improvement to my Cfd.git we can improve the code quality to be acceptable.
Thank youqingfeng.xia wrote: I fired the discussion of FluidMaterial, we will see the voting of the community on FemMaterial design.viewtopic.php?f=18&t=19401
Thank you, we will look into this.qingfeng.xia wrote: for Gmsh/Netgen function, there is no need to make CfdGmeshing class. we can just use meshing function in FEM workbench. femsolver has a field of category, by detecting that meshing taskpanel will know the favour of CFD and FEM , by this it will avoid the 95% code duplication. However, it makes sense to add toolbar of 'Fem_MeshNetgenFromShape', 'Fem_MeshGmshFromShape', into Cfd workbench.
We changed this because we were experiencing terminal hangs on repeated runs using the interactive option. I believe -l should be the right option here as it does the sourcing of the environment but does not run an interactive terminal.quingfen.xia wrote: in my code -i is used, not -l.
This is probably my mistake.quingfen.xia wrote: why the command string is unicode? mixed bin unicode may cause error.
Code: Select all
makke@ubuntu:~/FreeCAD_comp$ ideasUnvToFoam -case /tmp/case /tmp/case/case.unv
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 4.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 4.1
Exec : ideasUnvToFoam -case /tmp/case /tmp/case/case.unv
Date : Dec 30 2016
Time : 12:34:33
Host : "ubuntu"
PID : 11000
Case : /tmp/case
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time
Processing tag:164
Starting reading units at line 3.
l:1
units:" SI: Meter (newton)"
unitType:2
Unit factors:
Length scale : 1
Force scale : 1
Temperature scale : 1
Temperature offset : 273.15
Processing tag:2420
Skipping tag 2420 on line 9
Skipping section at line 9.
Processing tag:2411
Starting reading points at line 20.
Read 6185 points.
Processing tag:2412
Starting reading cells at line 12393.
First occurrence of element type 11 for cell 1 at line 12394
First occurrence of element type 41 for cell 615 at line 14236
First occurrence of element type 111 for cell 12917 at line 38840
Read 17825 cells and 12302 boundary faces.
Processing tag:2467
Starting reading patches at line 74492.
For group 1 named inlet1 trying to read 78 patch face indices.
For group 2 named inlet2 trying to read 22 patch face indices.
For group 3 named outlet trying to read 78 patch face indices.
For group 4 named wall trying to read 1046 patch face indices.
For group 5 named slip trying to read 11078 patch face indices.
Sorting boundary faces according to group (patch)
0: inlet1 is patch
1: inlet2 is patch
2: outlet is patch
3: wall is patch
4: slip is patch
Constructing mesh with non-default patches of size:
inlet1 78
inlet2 22
outlet 78
wall 1046
slip 11078
End
Code: Select all
sudo apt-get install python-gnuplot
Code: Select all
transformPoints -case "/tmp/TestCase" -scale "(0.001 0.001 0.001)"
Code: Select all
out = subprocess.check_output(['bash', '-l', '-c', cmdline], stderr=subprocess.PIPE)
Code: Select all
# this is the method works for both started in terminal and GUI launcher
env_setup_script = "source {}/etc/bashrc".format(getFoamDir())
#env_setup_script = "source ~/.bashrc"
cmdline_1 = ['bash', '-c', ' '.join([env_setup_script, '&&'] + _cmd)]
#cmdline = """bash -i -c '{} && {}' """.format(env_setup_script, ' '.join(_cmd))
#cmdline_1 = """bash -c ' {} && {}'""".format(env_setup_script, cmdline)
print("Run command_1: ", cmdline_1) # get correct command line, correct in terminal, but error in python
out = subprocess.check_output(cmdline_1, stderr=subprocess.PIPE)
Code: Select all
Export FemMesh to UNV format file: /tmp//TestCase/TestCase.unv
Run command: ideasUnvToFoam -case "/tmp/TestCase" "/tmp/TestCase/TestCase.unv"
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 4.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 4.1
Exec : ideasUnvToFoam -case /tmp/TestCase /tmp/TestCase/TestCase.unv
Date : Dec 30 2016
Time : 20:08:09
Host : "qingfeng-ubuntu"
PID : 12822
Case : /tmp/TestCase
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time
Processing tag:164
Starting reading units at line 3.
l:1
units:" SI: Meter (newton)"
unitType:2
Unit factors:
Length scale : 1
Force scale : 1
Temperature scale : 1
Temperature offset : 273.15
Processing tag:2420
Skipping tag 2420 on line 9
Skipping section at line 9.
Processing tag:2411
Starting reading points at line 20.
Read 2012 points.
Processing tag:2412
Starting reading cells at line 4047.
First occurrence of element type 11 for cell 1 at line 4048
First occurrence of element type 41 for cell 217 at line 4696
First occurrence of element type 111 for cell 3115 at line 10492
Read 7483 cells and 2898 boundary faces.
Processing tag:2467
Starting reading patches at line 25460.
For group 1 named FluidBoundary trying to read 0 patch face indices.
--> FOAM Warning :
From function void readSets(Foam::IFstream&, Foam::DynamicList<Foam::word>&, Foam::DynamicList<Foam::List<int> >&)
in file ideasUnvToFoam.C at line 553
Reading "/tmp/TestCase/TestCase.unv" at line 25462
When reading patches expect entity type code 8
Skipping group code -1
Sorting boundary faces according to group (patch)
Constructing mesh with non-default patches of size:
--> FOAM Warning :
From function Foam::polyMesh::polyMesh(const Foam::IOobject&, const Foam::Xfer<Foam::Field<Foam::Vector<double> > >&, const cellShapeList&, const faceListList&, const wordList&, const wordList&, const Foam::word&, const Foam::word&, const wordList&, bool)
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 595
Found 2898 undefined faces in mesh; adding to default patch.
End
Run command: transformPoints -case "/tmp/TestCase" -scale "(0.001 0.001 0.001)"
[1]+ Stopped freecad-daily
makkemal wrote:Thsi is where thing go wrong on my machine
Code: Select all
Traceback (most recent call last): File "/home/makke/Freecad/bin/Mod/Cfd/_TaskPanelCfdSolverControl.py", line 186, in write_input_file_handler ret = self.solver_runner.write_case() File "/home/makke/Freecad/bin/Mod/Cfd/CfdRunnableFoam.py", line 90, in write_case return self.writer.write_case() File "/home/makke/Freecad/bin/Mod/Cfd/CfdCaseWriterFoam.py", line 72, in write_case self.write_mesh() File "/home/makke/Freecad/bin/Mod/Cfd/CfdCaseWriterFoam.py", line 104, in write_mesh self.builder.setupMesh(unvMeshFile, scale) File "/home/makke/Freecad/bin/Mod/Cfd/FoamCaseBuilder/BasicBuilder.py", line 287, in setupMesh convertMesh(self._casePath, updated_mesh_path, scale) File "/home/makke/Freecad/bin/Mod/Cfd/FoamCaseBuilder/utility.py", line 535, in convertMesh runFoamApplication(cmdline,case) File "/home/makke/Freecad/bin/Mod/Cfd/FoamCaseBuilder/utility.py", line 518, in runFoamApplication out = subprocess.check_output(['bash', '-l', '-c', cmdline], stderr=subprocess.PIPE) File "/usr/lib/python2.7/subprocess.py", line 574, in check_output raise CalledProcessError(retcode, cmd, output=output) subprocess.CalledProcessError: Command '['bash', '-l', '-c', u'ideasUnvToFoam -case "/tmp/case" "/tmp/case/case.unv" > /tmp/case/log.ideasUnvToFoam']' returned non-zero exit status 127