0
$\begingroup$

enter image description hereI'm starting on FeynCalc and was trying to run through a few examples coming with the package. For the ones of which the models are generated by FeynRules, it doesn't work out well. (When the model is included in the FeynCalc package, it works fine.) I read somewhere that there might be some incompatibility between FeynRules and Mathematica 11 and not for previous versions. I'm using Mathematica 12.2; could that be the problem or is it due to something else? Attached is the code..ps. I already evaluated the GenerateModelPhi4.m as the documentation suggested. Thanks in advance!

MakeBoxes[p1,TraditionalForm]:="\!\(\*SubscriptBox[\(p\), \      (1\)]\)";
MakeBoxes[p2,TraditionalForm]:="\!\(\*SubscriptBox[\(p\), \(2\)]\)";
MakeBoxes[k1,TraditionalForm]:="\!\(\*SubscriptBox[\(k\), \(1\)]\)";
MakeBoxes[k2,TraditionalForm]:="\!\(\*SubscriptBox[\(k\), \(2\)]\)";

diags = InsertFields[CreateTopologies[1, 2 -> 2,
    ExcludeTopologies->{WFCorrections}],
    {S[1],S[1]}-> {S[1],S[1]}, InsertionLevel -> {Classes},
    Model -> FileNameJoin[{"Phi4","Phi4"}]];
Paint[diags, ColumnsXRows -> {3, 1}, Numbering ->       None,SheetHeader->None, ImageSize->{512,256}];
$\endgroup$
3
  • $\begingroup$ Please include the code you are using as text. $\endgroup$
    – MarcoB
    Commented May 28, 2023 at 1:10
  • $\begingroup$ I have included the code as text. Sorry for the inconvenience! $\endgroup$
    – khaki
    Commented May 28, 2023 at 21:23
  • $\begingroup$ You might put that information into a self-answer, if you think another user might benefit from your experience down the line. Self-answers are welcome on this forum. $\endgroup$
    – MarcoB
    Commented May 29, 2023 at 17:54

2 Answers 2

1
$\begingroup$

I've cleared the issue. The error comes from running the model generating file and the actual calculation on the same Kernel. To solve it, one just opens a separate Kernel to do the calculations.

$\endgroup$
1
  • $\begingroup$ This might be more appropriate as an edit to your question. $\endgroup$
    – bbgodfrey
    Commented May 30, 2023 at 3:46
1
$\begingroup$

By the way, here I want to also illustrate those messages about $CharacterEncoding.

The FeynRules package is writing files with OpenWrite, but didn't set the CharacterEncoding for it. As the metadata in this model file includes european diacritical characters, they were encoded like CharacterEncoding -> WindowsANSI.

And the FeynArts package is reading model files with Get, which defaults to use $CharacterEncoding, it won't be able to read a WindowsANSI encoded file if you've set it to UTF8 etc. .

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.