The violent conflict in Iran has deeply divided the Persian community here, the largest in North America, opening what amounts to a western front in the bitter battle going on back home.

Around their swimming pools in such posh areas as Beverly Hills and Marin County just north of San Francisco, wealthy Iranians speak bitterly about college students who, they fear, are working to undermine Shah Mohammad Reza Pahlavi in the land of his most important ally. Those same students, often living meagerly in rundown apartments across the state, point t the rich Iranians as plutocrats whose lifestyles would be banned in any post-shah future.

The gulf separating these recent arrivals who came with money and the close to 14,000 students in California - 40 percent of all Iranians studying in schools acros the country - has been exacerbated by the bitted conflicts plaguing Iran today. Some wealthy Iranians accuse students of being destructive radicals eager to undermine decades of progress; they fear openly for their families in the old country.

"There are a lot of these students who are from average lower-class families and they have a lot of confused feelings in their heads," said Henry Hakim, a wealthy Iranian who lives in Bel-Air, a fashionable section of Los Angeles. "I haven't seen what they complain about. I haven't seen the shah harm anyone or do any harm to the country. Frankly, I don't think anyone else could run the country."

Like other wealthy Iranians, Hakim fears student militants are working against all the economic gains made by his family over the past few decades. In particular he resents the fact that a hotel in Tehran owned by his mother's family was burned down during an anti-shah demonstration in June.

From the rich Persians in California there is also a great deal of resentment toward President Carter, whose human rights policy, they claim, has helped spark the current protest. These Iranians accuse the students, despite their democratic slogans, of aiming to replace one authoritarian regime with another at the cost of loss of life and property.

"Students are always unhappy, you know," said Parviz Parvizyar, a wealthy Beverly Hills Iranian. "Sure it's been a police state but if the communists get in would that change? I think not."

Some well-to-do Iranians are so concerned about the current situation that they are planning ways to get their families out of the country if conditions worsen. One said he recently filed for American citizenship because "some of my family might want to get out, considering what's happened."

To many of the students, these attitudes reflect the essence of what they see as an unpatriotic and self-serving ruling class supporting the shah. While the rich talk of fleeing to America, several radical students have, according to Iranian student sources, dropped their studies to return to their strike-torn homeland.

"Everyone who is here is frustrated. You see in front of you history being made," said one spokesman for the Iranian Student Association (ISA), a coalition of several hundred Persian students in the San Francisco Bay area. "Unless you take concrete action, you feel like a hypocrite."

For years members of ISA and other left-wing Iranian student groups have been taking "concrete action" on the streets of California cities and on local college campuses.

With bags over their heads to hide their identities from SAVAK, the Iranian secret police they have become among the most visible protest groups in the quiescent '70s. In early September, for instance, several hundred Iranian students got into a 1960s-style confrontation with Los Angeles police during an anti-shah demonstration, resulting in about 30 injuries and 120 arrests.

But in recent years a severe split has hampered the Iranian student movement in California. Many younger students have turned away from the traditionally Marxist-oriented politics of Iranian activists here and embraced the Islamic philosophy of the leader of today's anti-shah movement,Ayatollah Khomeini.

"Most Iranian students here are probably still Marxists but that is who teaches Islamic studies at the University of California at Berkeley. "The Moslems used to be more introverted, but as the Moslem movement has grown, they have become changing," said Prof. Hamid Algar, more confident. The split among the Iranian students now is not pro- or anti-shah but between Moslems and Marxists."

In both Los Angeles and the bay area, hostility between the two groups has been growing. They often go to different Iranian restaurants, attend separate celebrations for the Persian New York in March and play on opposing athletic teams. When they do confront each other - at a party or on a soccer field - the result is often unpleasant and even violent.

While the secular activist students are much like their American counterparts in their habits and lifestyle, the Moslems tend to live by the puritanical moral strictures of the Koran, which bans drinking, smoking and premarital sex. These differences are central to their opposing vision of a post-shah Iran - the secular activists want a democratic, pluralistic state while the Moslems insist upon an Islamic republic run along the ideals of the Koran.

Student groups like the ISA are working to bridge the gap but privately most Marxists and secular Iranians fear the rise of Khomeini as leader of post-revolutionary Iran. "An Islamic republic is just another dictatorship," one leftist student said. "I'm opposed to theocracy. I don't think that would be unifying force for Iran."

Moslem leaders believe the Marxists and other secular activists resent the fact that they have been forced to the sidelines now that the long-awaited revolution may be at hand. The Moslems see the current protest in Iran as religiously motivated and dismiss attempts by their secular student enemies to put the current rebellion in a democratic or Marxistcontext.

"There's no doubt religion is the main reason for the rebellion no matter what they say," said one young Moslem student at Berkeley. "This attempt to distinguish between a political protest and a religious one makes no sense. In Islam they are the same thing. There is no place for a secular government in Islamic countries."

As events unfold in Iran there is little chance these divisions among California's Persian community will do anyting but intensify.

About the only thing the various factions are likely to share is a sense of frustration with the distance between them and the events which are shaping the future of their country.

"It's a strange feeling being here, particularly during the last three months," said one young student at UCLA. "You can go to papers, to television, to the radio and yet you wish so much to be there. You feel constrained - you are totally at the mercy of Walter Cronkite and Marvin Kalb."