Error importing weight field file

hello , When I try to import the weight field file obtained from comsol, the error message in the figure below always appears. I did it again many times, the result is still like this.!


WPOT.txt is the electric potential (V) distribution file
WPOT1.txt is the electric field (V/m) distribution file
The file is relatively large, so it is compressed using compression software (360zip)
WPOT.zip (501.2 KB)
WPOT1.zip (674.6 KB)

1 Like

Can you attach the file (WPOT1.txt)?

1 Like

hello, I just uploaded the WPOT.txt file.

1 Like

Dear changjh12,

A change of the SetWeightingField function has been pushed to the repository. I would be curious to know if this solves your problem. If not, please let me know.

1 Like

Dear djjansse
Unfortunately, the same error message still appears.

1 Like

Dear Changjh12,

Thank you for coming back to me. In that case could you provide me with the files containing the code, mesh information and dielectric constants? This will allow me to run it in full.

1 Like

dielectrics.zip (191 Bytes)
mesh.zip (1.5 MB)
field.zip (501.2 KB)
sdj.C (7.6 KB)
WPOT1.zip (674.6 KB this is WeightingField file)
WPOT.zip (501.2 KB This is a weight potential file)

Hello ,Here are all the documents, thank you

Hello ,Dear djjansse.
Have you found the cause of the error? I tried to make changes, but the same error message is still displayed so far. I really don’t know what to do.
If you find the reason, please tell me, thank you!

Dear changjh12,

My apologies for my late reply. I have run your code and everything seems to be working as intended on my end. That is, the ComponentComsol error message has disappeared, the weighting field is imported and the code runs until the end. Do you still have the “Error parsing WPOT1.txt” message?

Kind regards,

Djunes Janssens

Thank you for your reply. Yes, the error message still exists. Maybe it’s because of the software version? I think I may need to reinstall the software?

Dear changjh12,

Yes, you should pull the newest version from git (execute “git pull” in the Garfield++ folder) and then rebuild the code as instructed in the installation guide. Let me know if this solves it.

Kind regards,

Djunes

Dear djjansse

I reinstalled the software and the files can be imported normally.
Thank you very much for your help.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.