FastFieldSolvers Forum
FastFieldSolvers Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
 All Forums
 FastFieldSolvers
 FasterCap and FastCap2
 how to using command "capgen"
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Dshih

Taiwan
5 Posts

Posted - Oct 10 2023 :  17:45:34  Show Profile  Reply with Quote
Hi fellows,
I am now trying to calculate the capacitance of parallel plate.
(two 2*2 plates, separation is 4)

And I found that user_duide has mentioned a command: "capgen".
I directly using it, but there is an error.
Can anyone teach me how to fix it.

code:
0 parallel plate capacitor
capgen -n2 -e1.0 -s4.0 | fastcap


thank you

Enrico

530 Posts

Posted - Oct 10 2023 :  18:15:02  Show Profile  Reply with Quote
Hi Dshih,

are you using *nix or the Windows / DOS porting?

Best,
Enrico
Go to Top of Page

Dshih

Taiwan
5 Posts

Posted - Oct 11 2023 :  19:40:21  Show Profile  Reply with Quote
Hi Enrico,

I use windows system.

Besides, I'm learning how to use "T", "Q" commands.
So, in my case, can I directly coding like this? or I have to fix it in another way?
code:
0 parallel plate capacitor
Q plane1 0.0 0.0 2.0 2.0 0.0 2.0 0.0 2.0 2.0 2.0 2.0 2.0
Q plane2 0.0 0.0 -2.0 2.0 0.0 -2.0 0.0 2.0 -2.0 2.0 2.0 -2.0

thank you
Go to Top of Page

Enrico

530 Posts

Posted - Oct 13 2023 :  11:09:00  Show Profile  Reply with Quote
Hi Dshih,

you cannot use the generators (e.g. capgen) inside an input file.

The generators are small programs intended to be launched from the shell (in Windows case, from the DOS shell or if you prefer also from the PowerShell) and output a text file that can be used, or incorporated, in a geometry description file for FastCap / FasterCap.

Originally designed for Unix, we ported them for DOS. Note that in the DOS case, you cannot use the pipe (i.e. |) as DOS works a bit differently from *nix. You should redirect the output to a file, e.g.

capgen -n2 -e1.0 -s4.0 > myfile.qui


and use the "myfile.qui" in your simulation(s).

Best,
Enrico
Go to Top of Page

Dshih

Taiwan
5 Posts

Posted - Oct 15 2023 :  17:26:39  Show Profile  Reply with Quote
Hi Enrico,

Thank you for your reply, I'll try "capgen" again.

Can I ask you that I know the first line of the file must be start with "0", but I get feedback of the output said:
read_list_file: bad line format, Line 1:
0 test model

my code (I save it as a .qui file):
0 test model
*
Q plane1 0.0 0.0 2.0 2.0 0.0 2.0 0.0 2.0 2.0 2.0 2.0 2.0
Q plane2 0.0 0.0 -2.0 2.0 0.0 -2.0 0.0 2.0 -2.0 2.0 2.0 -2.0

Edited by - Dshih on Oct 15 2023 17:29:54
Go to Top of Page

Enrico

530 Posts

Posted - Oct 16 2023 :  08:57:33  Show Profile  Reply with Quote
This is usually caused by running the file as a list file ("-l" option, that is the default). To run directly a geometry definition file you must un-select the -l option.

Best,
Enrico
Go to Top of Page

Dshih

Taiwan
5 Posts

Posted - Oct 17 2023 :  19:12:06  Show Profile  Reply with Quote
Hi Enrico,

I have unselected the "list file", but it seems I got something wrong with my code.
I found my input file was not two parallel planes in the fastmodel(I choose "dsiplay as solid" to check it). It looks like two planes but missing a quarter of triangle (both of them).

code:
0 parallel planes
*
Q plane1 0.0 0.0 2.0 2.0 0.0 2.0 0.0 2.0 2.0 2.0 2.0 2.0
Q plane2 0.0 0.0 -2.0 2.0 0.0 -2.0 0.0 2.0 -2.0 2.0 2.0 -2.0

Thank you for answering my questions.
Sorry for any mistake, English is not my native language.

Edited by - Dshih on Oct 17 2023 19:15:16
Go to Top of Page

Enrico

530 Posts

Posted - Oct 17 2023 :  23:35:34  Show Profile  Reply with Quote
Look at the corner coordinates. They should be in CW or CCW order, they are instead in random order. The quadrilateral folds on itself with the order you specified.
Best,
Enrico
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
FastFieldSolvers Forum © 2020 FastFieldSolvers S.R.L. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.06