Activity for xfemm

  • Doug Harriman Doug Harriman modified a comment on discussion General Discussion

    I'm trying to run femmcli with a very simple magnetics problem to verify I can get it working properly. I have installed v4.0 of xfemm in Ubuntu. The lua script for the model is attached, as well as the copy of the matlib.dat from the FEMM source code, containing the N42 magnet material description. I have both files in the same directory, then run: femmcli --lua-base-dir=. --lua-script=simple.lua When run, I get the following result: Using custom base directory . Label has invalid block type index:...

  • Doug Harriman Doug Harriman posted a comment on discussion General Discussion

    I'm trying to run femmcli with a very simple magnetics problem to verify I can get it working properly. I have installed v4.0 of xfemm in Ubuntu. The lua script for the model is attached, as well as the copy of the matlib.dat from the FEMM source code, containing the N42 magnet material description. I have both files in the same directory, then run: femmcli --lua-base-dir=. --lua-script=simple.lua When run, I get the following result: Using custom base directory . Label has invalid block type index:...

  • Leon Leon modified a comment on discussion General Discussion

    I have matlab 2023 running in window 11 environment and have C++ 2017 setup as shown below, and try to setup mfemm, it throw error below. I searched around, not much valid information online to help me finish the mfemm setup finish. anyone can help? mex -setup MEX configured to use 'Microsoft Visual C++ 2017 (C)' for C language compilation. To choose a different C compiler, select one from the following: MinGW64 Compiler (C) mex -setup:F:\MATLAB\R2023b\bin\win64\mexopts\mingw64.xml C Microsoft Visual...

  • Leon Leon posted a comment on discussion General Discussion

    I have C++ 2017 setup, and try to setup mfemm, it throw error below. I searched around, not much valid information online. mex -setup MEX configured to use 'Microsoft Visual C++ 2017 (C)' for C language compilation. To choose a different C compiler, select one from the following: MinGW64 Compiler (C) mex -setup:F:\MATLAB\R2023b\bin\win64\mexopts\mingw64.xml C Microsoft Visual C++ 2017 (C) mex -setup:C:\Users\xx\AppData\Roaming\MathWorks\MATLAB\R2023b\mex_C_win64.xml C To choose a different language,...

  • Eric Maslen Eric Maslen posted a comment on discussion General Discussion

    Thanks, I think I figured the Github thing out. I made the same changes that Robert previously recommended except that he didn’t leave any notes on compiler issues. Still picking away at this. On Aug 21, 2023, at 10:40 AM, Richard C crobarcro@users.sourceforge.net wrote: Github is where xfemm's latest source code is stored and developed. https://github.com/Reoptimize-Systems/xfemm We use Git for development, and Github is a kind of web interface for Git. PR is short for Pull Request. Probably explaining...

  • Richard C Richard C posted a comment on discussion General Discussion

    Github is where xfemm's latest source code is stored and developed. https://github.com/Reoptimize-Systems/xfemm We use Git for development, and Github is a kind of web interface for Git. PR is short for Pull Request. Probably explaining what a pull request is is beyond the scope of this forum. At the very least, however, using the 'Issues' tab for the project to describe the problem and track it would be useful and requires no prior knowledge of git or github.

  • Eric Maslen Eric Maslen posted a comment on discussion General Discussion

    Richard, This sounds great but I’ll need it in English: what are PR and Github? -Eric On Aug 21, 2023, at 10:15 AM, Richard C crobarcro@users.sourceforge.net wrote: Even better if you can submit a PR on Github! Compiling the MATLAB interface on MacOS https://sourceforge.net/p/xfemm/discussion/general/thread/08f86ebde5/?limit=25#3d97 Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/xfemm/discussion/general/ To unsubscribe from further messages, please visit ht...

  • Richard C Richard C posted a comment on discussion General Discussion

    Even better if you can submit a PR on Github!

  • Eric Maslen Eric Maslen posted a comment on discussion General Discussion

    Ugh! No luck with the zip file that Robert uploaded. It seems that his version only compiles on x86_64 architectures and I have an arm64 machine. If anybody has tackled this problem, I would appreciate your help!

  • Richard C Richard C posted a comment on discussion General Discussion

    If you open a github issue it is a bit more likely to get addressed. Unfortunately there doesn't seem to be many mac users (or at least enough who complain).

  • Eric Maslen Eric Maslen posted a comment on discussion General Discussion

    It's hard to believe that this discussion died in 2020! I'm trying to implement XFEMM on a Mac M1 and am running into the same problems that Robert had then. If anybody is listening, I'd appreciate any help you can give. Meanwhile I will sequentially implement the fixes that Robert appears to have used and see how far I get.

  • hassan elsayed hassan elsayed posted a comment on discussion General Discussion

    Yes, i just did it. However, now i received error during compiling the mex files Seems like missing packages. Error: /usr/lib64/gcc/x86_64-suse-linux/12/../../../../x86_64-suse-linux/bin/ld: cannot find -loctinterp /usr/lib64/gcc/x86_64-suse-linux/12/../../../../x86_64-suse-linux/bin/ld: cannot find -loctave collect2: error: ld returned 1 exit status warning: mkoctfile: building exited with failure status error: mex: building exited with failure status Any idea? Thank you. On Sun, 14 May 2023 at...

  • hassan elsayed hassan elsayed posted a comment on discussion General Discussion

    Yes, i just did it. However, now i received error during compiling the mex files. /usr/lib64/gcc/x86_64-suse-linux/12/../../../../x86_64-suse-linux/bin/ld: cannot find -loctinterp /usr/lib64/gcc/x86_64-suse-linux/12/../../../../x86_64-suse-linux/bin/ld: cannot find -loctave collect2: error: ld returned 1 exit status warning: mkoctfile: building exited with failure status error: mex: building exited with failure status Any idea? Thank you.

  • Richard C Richard C posted a comment on discussion General Discussion

    have you run mfemm_setup?

  • hassan elsayed hassan elsayed posted a comment on discussion General Discussion

    fpproc warning: error caught while executing handle class delete method: 'fpproc_interface_mex' undefined near line 91, column 91 error: 'fpproc_interface_mex' undefined near line 81, column 81 error: called from fpproc at line 81 column 31 I added the path to fpproc_interface_mex.cpp "xfemm_linux64/mfemm/postproc/", but not working! Any suggestion? Thank you in advanced.

  • xfemm xfemm released /v4.0/xfemm-4.0-mingw-win64.zip

  • xfemm xfemm updated /v4.0/README.md

  • Richard C Richard C imported Files

  • xfemm xfemm released /v4.0/xfemm-4.0-Source.zip

  • xfemm xfemm released /v4.0/xfemm-4.0-Linux64.tar.gz

  • xfemm xfemm released /v4.0/xfemm-4.0.0-win64.exe

  • xfemm xfemm released /v4.0/Release Version 4.0.zip

  • xfemm xfemm released /v4.0/Release Version 4.0.tar.gz

  • xfemm xfemm released /v4.0/README.md

  • Richard C Richard C imported Files

  • Richard C Richard C posted a comment on discussion General Discussion

    Thanks, could you please submit an issue on github with an example failing script please.

  • Bo C. Herlin Bo C. Herlin posted a comment on discussion General Discussion

    In xfemm it seems calls to mi_addmaterial must be done before calls to mi_setblockprop. The function mi_makeABC in init.lua doesnt take that into account so it crashes (femmcli version 3.0.0). Femm on the other hand is more forgiving so it works there.

  • Salameche Salameche posted a comment on discussion General Discussion

    I tried to rebuild from sources. It is OK. However, when I tried to execute the code on matlab, I have a crach. here is the report : " MATLAB crash file:D:\Users\hlioui\AppData\Local\Temp\matlab_crash_dump.5076-1: Access violation detected at 2020-09-30 00:24:10 +0200 Configuration: Crash Decoding : Disabled - No sandbox or build area path Crash Mode : continue (default) Default Encoding : windows-1252 Deployed : false Graphics Driver : Unknown hardware Graphics card 1 : Intel Corporation ( 0x8086...

  • Andres Andres modified a comment on discussion General Discussion

    I tried to add one more parameter on "loadfemmsolution.m", in this way the error dissapears (I know it is not totally correct, but I just wanted to test it). But now, I realize that XFEMM 1.9 does not include gapintegral function. So I think I should use the version I found on master branch of the repository.

  • Andres Andres posted a comment on discussion General Discussion

    I tried to add one more parameter on "loadfemmsolution.m" (I know it is not totally correct, but I just wanted to test it). Now I realize that XFEMM 1.9 does not include gapintegral function. So I think I should use the version I found on master branch of the repository.

  • Andres Andres posted a comment on discussion General Discussion

    Trying with 1.9 release it gives me an error on the line 863 of "loadfemmsolution.m": C = textscan(s,'%f %f %f %f %f %f %f'); I did the FEM model using FEMM 4.2, I think it has 8 parameters on the "ArcSegments" section, but XFEMM is parsing only 7. Thus, when creating the arcsegment it fails. I think you included the 8th parameter on XFEMM 3.0. I tried to build the mex files for that version but I'm getting some errors. Please, let me know what do you recommed. Thank you very much.

  • Richard C Richard C posted a comment on discussion General Discussion

    Actually, to be more accurate, please try with the 1.9 release. There's issues with the other releases which were never resolved.

  • Richard C Richard C posted a comment on discussion General Discussion

    Please try with the latest release. The github master is not guaranteed to work, and is WIP.

  • Andres Andres posted a comment on discussion General Discussion

    I compiled the version of XFEMM on the master branch on git. (commit a8755ee) The Octave version is 5.2. I'm testing on Ubuntu 18.04.

  • Richard C Richard C posted a comment on discussion General Discussion

    exactly what version are you using?

  • Andres Andres modified a comment on discussion General Discussion

    Hello, I'm trying to use XFEMM instead of using FEMM because I need to run it natively on Linux. I rewrite my Octave code but I'm getting totally different results, maybe I'm missing something. XFEMM Code addpath('/home/ubuntu/Development/xfemm/mfemm'); Hcb = 1021.11500893075 * 10e3; #Coercivity mu_r = 1.01404671842254; #Relative permeability theta = (0:0.1:7.5); EM_temp_file = './Motor.fem'; i = 10; CustomMotor = loadfemmfile(EM_temp_file); ##%Modify magnet material CustomMotor = modifymaterial_mfemm(CustomMotor,...

  • Andres Andres posted a comment on discussion General Discussion

    Hello, I'm trying to use XFEMM instead of using FEMM because I need to run it natively on Linux. I rewrite my Octave code but I'm getting totally different results, maybe I'm missing something. XFEMM Code addpath('/home/ubuntu/Development/xfemm/mfemm'); Hcb = 1021.11500893075 * 10e3; #Coercivity mu_r = 1.01404671842254; #Relative permeability theta = (0:0.1:7.5); EM_temp_file = './Motor.fem'; i = 10; CustomMotor = loadfemmfile(EM_temp_file); ##%Modify magnet material CustomMotor = modifymaterial_mfemm(CustomMotor,...

  • safa safa posted a comment on discussion General Discussion

    Hi everyone, while executing optimization task using Matlab 2020a/xfemm 4.2, I permanently get the error of : "Warning: The following error was caught while executing 'fpproc' class destructor: Invalid MEX-file".

  • Jean Le Besnerais Jean Le Besnerais posted a comment on discussion General Discussion

    Hello, It seems that your software development project makes use of FEMM software. A project called Pyleecan has been initiated under Python to join all open-source development efforts around electrical machines FEA analysis within a single project. Pyleecan already includes modelling of main radial flux electrical machines like IPMSM, SPMSM, SCIM, WRSM, SynRM and SRM and can be easily extended to brand new topologies (including 3D) based on Object Oriented Programming. Pyleecan also includes multiphysic...

  • Salameche Salameche posted a comment on discussion General Discussion

    I am on windows for now but I will use a cluster on Linux (later)

  • Richard C Richard C posted a comment on discussion General Discussion

    You might need to rebuild from sources, are you on windows or linux?

  • Salameche Salameche posted a comment on discussion General Discussion

    Thank you for your response. However, when I try to use the 1.9 version with matlab 2020a, I have a crach and could not use Xfemm. Could-you help me ? Thank you

  • Richard C Richard C posted a comment on discussion General Discussion

    There are issues with this version, hence the official download still being 1.9, I reccomend sticking with that for now.

  • Salameche Salameche modified a comment on discussion General Discussion

    Hello, I have tried to use the V3 version of the code and obtain this error " Reference to non-existent field 'Holes'. Error in writefemmfile (line 704) nholes = numel(FemmProblem.Holes); Error in femm_manual_tutorial_example (line 256) writefemmfile(filename, FemmProblem);" Could-you tell me what to do in order to use this new version. Thank you

  • Richard C Richard C posted a comment on discussion General Discussion

    I applied Christian's fix on Github with this commit: https://github.com/REOptimize-Systems/xfemm/commit/1335a7921937608d44b205dd108bee8c71919d57 Any further disuccion would be best done on github

  • Richard C Richard C posted a comment on discussion General Discussion

    Christian thanks for this, I will take a look at the patch. Incidentally, I just moved the code to github here: https://github.com/REOptimize-Systems/xfemm Feel free infuture to fork the github repo and send me a pull request. I'll try applying your patch when I get a chance.

  • Christiaan van Dijk Christiaan van Dijk posted a comment on discussion General Discussion

    Failed to attache the example file, here it is.

  • Christiaan van Dijk Christiaan van Dijk posted a comment on discussion General Discussion

    Hi, I have been having the same problem, solver returns a huge amount of nan in the result file which breaks my post processing. In older versions everything worked fine so I tracked the problem back to a update in "fsolver.cpp", at line 1104 a part is commented out which causes the problem. This makes sense as I later realized the problem started when I used wiretype 0. Included a patch and a .fem file to reproduce the problem. Still have to run some more data to see if this really fixed the problem...

  • Robert Robert posted a comment on discussion General Discussion

    Hi again, Richard. Thanks for the feedback. I just recently got everything to compile on my machine and I'm a little afraid to roll back, but I could give this a shot in a backup directory. So, is it safe to assume that the major refactoring that took place after 1.9 introduced a few bugs? I'm just curoius as to why 3.0 is not the recommended version. Is work continuing on 3.0? As of today, it seems that the most recent commit was late 2019.

  • Richard C Richard C posted a comment on discussion General Discussion

    Sorry, I was interrupted, there are issues with the development sources, Try the latest official download (in fact I'd reccommend version 1.9 for now).

  • Richard C Richard C posted a comment on discussion General Discussion

    Try the official

  • Robert Robert posted a comment on discussion General Discussion

    Does anyone have any idea why the solutions to static magnetic problems in xfemm would appear in line with FEMM results, but harmonic solutions at any frequency give only NaN for solution components? The harmonic problems differ from the static problems only by their value for frequency. This is true for both planar 2D and axisymmetric problems. When I write the fem file associated with the harmonic problem with writefemmfile, FEMM opens and solves it without issue. What might be going on here? Here's...

  • Robert Robert modified a comment on discussion General Discussion

    Is there a tool in xfemm to remove segments? I see one for removing nodes, but not segments. Based on the code for deletenode_mfemm, it looks like eliminating an entry in the Segments or ArcSegments arrays must be followed by a renumbering of elements in order to work properly. Is the code in this file essentially all that is needed to delete segments? Is there any reason why this hasn't been broken out into its own function?

  • Robert Robert posted a comment on discussion General Discussion

    Is there a tool in xfemm to remove segments? I see one for removing nodes, but not segments. Based on the code for deletenode_mfemm, it looks like eliminating an entry in the Segments or ArcSegments arrays must be followed by a renumbering of elements in order to work properly. Is the code in this file essentially all that is needed to delete segments? Is there any reason this hasn't been broken out into its own function?

  • Robert Robert posted a comment on discussion General Discussion

    I wrote an elementary script in the style of other xfemm functions to solve the basic problem for which I started this thread. I've attached the code here for anyone to use. Caveat emptor: 1. I'm no software engineer, and I wrote this on a tight time budget. I've only performed the most cursory debugging. 2. Magnetics problems only (although adapting this code for use with the other solvers doesn't seem difficult since they share so much code in common. See init.lua.) 3. The center point and radius...

  • Robert Robert posted a comment on discussion General Discussion

    I know this is an old thread (as are most of the threads here) but I was about to post about this very same issue myself. I've noticed that there seems to be a significant difference between how FEMM and xfemm treat overlapping segments; in FEMM, overlapping segments are automatically merged, deleted, and split in such a way that you need never (or, at least, I never) worry about overlapping segments; the concept was entirely new to me when I started using xfemm. I've been reading through the IABC...

  • Robert Robert modified a comment on discussion General Discussion

    There's a very useful wizard in FEMM, "Create IABC Open Boundary," which automatically constructs high-order asymptotic boundary conditions using the problem geometry and user inputs. Is this tool available somewhere in xfemm? I tried searching the xfemm source directories for "ABC" as well as for one of the idiosyncratic permeability coefficients, but all that returns is init.lua, which I believe is FEMM source. It seems rather straightforward (albeit time-consuming and prone to transcription error)...

  • Robert Robert modified a comment on discussion General Discussion

    There's a very useful wizard in FEMM, "Create IABC Open Boundary," which automatically constructs high-order asymptotic boundary conditions using the problem geometry and user inputs. Is this tool available somewhere in xfemm? I tried searching the xfemm source directories for "ABC" as well as for one of the idiosyncratic permeability coefficients, but all that returns is init.lua, which I believe is FEMM source. It seems rather straightforward (albeit time-consuming and prone to transcription error)...

  • Robert Robert posted a comment on discussion General Discussion

    There's a very useful wizard in FEMM, "Create IABC Open Boundary," which automatically constructs high-order asymptotic boundary conditions using the problem geometry and user inputs. Is this tool available somewhere in xfemm? I tried searching the xfemm source directories for "ABC" as well as for one of the idiosyncratic permeability coefficients, but all that returns is init.lua, which I believe is FEMM source. It seems rather straightforward (albeit time-consuling and prone to transcription error)...

  • Robert Robert posted a comment on discussion General Discussion

    Sounds good. Thank you for all of the work that you've put into this project!

  • Richard C Richard C posted a comment on discussion General Discussion

    I was listening, if it helps, but unfortunately too busy to help at the moment, and have experience, or access to a mac. At some point I can see if I can merge your changes with the main code.

  • Robert Robert posted a comment on discussion General Discussion

    Well, I got it all to compile. It was a massive pain. I modified several include directives and compilation options as described above (trivial modifications, I suspect) but also commmented out a couple of FPU-related lines (potentially more consequential?) since Apple purportedly does not support the setting of FPU flags. I've attached my whole build directory (which includes the binaries) here. I was talking to myself on this forum - perhaps there isn't a lot of Mac interest here - but I thought...

  • Robert Robert modified a comment on discussion General Discussion

    Almost forgot to mention that the very first issue I had was with sincos when compiling femmcomplex.cpp: Error using mex /Users/rapmaster/Documents/MATLAB/xfemm_linux64/mfemm/../cfemm/libfemm/liblua/femmcomplex.cpp:629:5: error: use of undeclared identifier 'sincos'; did you mean '__sincos'? sincos(x.im, &sin_x, &cos_x); __sincos /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:655:29: note: '__sincos' declared here __header_always_inline void __sincos(double __x, double *__sinp,...

  • Robert Robert posted a comment on discussion General Discussion

    Almost forgot to mention that the very first issue I had was with sincos when compiling femmcomplex.cpp: Error using mex /Users/rapmaster/Documents/MATLAB/xfemm_linux64/mfemm/../cfemm/libfemm/liblua/femmcomplex.cpp:629:5: error: use of undeclared identifier 'sincos'; did you mean '__sincos'? sincos(x.im, &sin_x, &cos_x); Quite helpfully, it suggested swapping for a similar function with preceeded by two underscores: __sincos /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:655:29:...

  • Robert Robert modified a comment on discussion General Discussion

    Has anyone had any luck compiling the MATLAB interface on MacOS? I'm not particularly C / C++ / compiler-savvy, so I could really use a hand... if it's even possible to compile for my architecture at all. Clang is the default compiler on MacOS. Basically, I'm just trying to run mfemm_setup (release 3_0) to completion. I was able to address a compilation issue with many of the files by changing the include directive for malloc.h to cstdlib. This allowed setup to make progress until it hit mexfmesher.cpp,...

  • Robert Robert modified a comment on discussion General Discussion

    Has anyone had any luck compiling the MATLAB interface on MacOS? I'm not particularly C / C++ / compiler-savvy, so I could really use a hand... if it's even possible to compile for my architecture at all. Clang is the default compiler on MacOS. Basically, I'm just trying to run mfemm_setup (release 3_0) to completion. I was able to address a compilation issue with many of the files by changing the include directive for malloc.h to cstdlib. This allowed setup to make progress until it hit mexfmesher.cpp,...

  • Robert Robert modified a comment on discussion General Discussion

    Has anyone had any luck compiling the MATLAB interface on MacOS? I'm not particularly C / C++ / compiler-savvy, so I could really use a hand... if it's even possible to compile for my architecture at all. Clang is the default compiler on MacOS. Basically, I'm just trying to run mfemm_setup (release 3_0) to completion. I was able to address a compilation issue with many of the files by changing the include directive for "malloc.h" to <cstdlib>. This allowed setup to make progress until it hit mexfmesher.cpp,...

  • Robert Robert posted a comment on discussion General Discussion

    Has anyone had any luck compiling the MATLAB interface on MacOS? I'm not particularly C/C++ or compiler-savy, so I could really use a hand... if it's even possible to compile for my architecture at all. Clang is the default compiler on MacOS. Basically, I'm just trying to run mfemm_setup (release 3_0) to completion. I was able to address a compilation issue with many of the files by changing the include directive for "malloc.h" to <cstdlib>. This allowed setup to make progress until it hit mexfmesher.cpp,...

  • Johannes Zarl-Zierl Johannes Zarl-Zierl posted a comment on discussion General Discussion

    This issue is now tracked in https://sourceforge.net/p/xfemm/tickets/2/

  • Johannes Zarl-Zierl Johannes Zarl-Zierl posted a comment on discussion General Discussion

    Hi, Sorry, I'm quite late to the party - thanks for reporting this and even more for taking the time to find and link the Triangle bug report as well. No, this is not a known problem to me. Did you ever find a root cause, or can you share a file that triggers the bug? Cheers, Johannes

  • Johannes Zarl-Zierl Johannes Zarl-Zierl posted a comment on discussion General Discussion

    Hi, Sorry for the late reply (I don't look at the forum that often). I don't have Matlab/Octave set up here, but after removing the "PrevType" line in the .fem/.ans file it is at least opened correctly by cfemm. My guess is therefore that mfemm chokes on the same token, which is not yet supported by xfemm. HTH, Johannes

  • Pierre P Pierre P modified a comment on discussion General Discussion

    Hi community, First of all, I'm really impressed by xfemm so far and how fast it allows solving and postprocessing compared to femm42 itself. Great idea to have the heavy lifting done in C++ and able to run under Linux. I'm successfully able to mesh and solve .fem files but I'm having an issue when trying to load the generated .ans file in femm to do some post processing from matlab (I already developed quite a bit of code to do so before xfemm existed so don't want to switch to fpproc right now)....

  • Pierre P Pierre P posted a comment on discussion General Discussion

    Hi community, First of all, I'm really impressed by xfemm so far and how fast it allows solving and postprocessing compared to femm42 itself. Great idea to have the heavy lifting done in C++ and able to run under Linux. I'm successfully able to mesh and solve .fem files but I'm having an issue when trying to load the generated .ans file in femm to do some post processing from matlab (I already developed quite a bit of code to do so before xfemm existed so don't want to switch to fpproc right now)....

  • Richard C Richard C posted a comment on discussion General Discussion

    I'm not the FEMM project, xfemm works differently, but I'll help you anyway. The problem is that Octave is trying to communicate with FEMM using activex, which doesn't work on Linux. You need to use the filelink method instead. You need to start femm with the --filelink option (see manual, and possibly edit openfemm to make sure it doesn't try to use the activex server. It shouldn't be trying to use the activex server, it should only do this on Windows, but it seems like it is trying to. If you want...

  • hassan elsayed hassan elsayed posted a comment on discussion General Discussion

    Hi, i am intended to run Femm through Octave on Linux Mint OS, after successfully installation for Femm (with wine) and GNU Octave (software manager), then i followed the instructions on http://www.femm.info/wiki/LinuxSupport. So, the problem is, every time i run openfemm, it gives the following Error: openfemm error: actxserver: Your system doesn't support the COM interface error: called from openfemm at line 12 column 21 Would you helpe?! Thanks Hassan

1 >